chansrv/audin,sound: record index of formats array

It helps to know which audio format is in use.
This commit is contained in:
Koichiro IWAO 2023-02-09 01:03:51 +09:00
parent a355b7bf98
commit 73a8865561
2 changed files with 5 additions and 1 deletions

View File

@ -284,6 +284,7 @@ audin_process_formats(int chan_id, struct stream *s)
in_uint16_le(s, wf->cbSize);
LOG(LOG_LEVEL_INFO, "audin_process_formats:");
LOG(LOG_LEVEL_INFO, " wFormatNo %d", index);
LOG(LOG_LEVEL_INFO, " wFormatTag %s", audin_wave_format_tag_to_str(wf->wFormatTag));
LOG(LOG_LEVEL_INFO, " nChannels %d", wf->nChannels);
LOG(LOG_LEVEL_INFO, " nSamplesPerSec %d", wf->nSamplesPerSec);

View File

@ -370,6 +370,7 @@ sound_process_output_format(int aindex, int wFormatTag, int nChannels,
int cbSize, char *data)
{
LOG(LOG_LEVEL_INFO, "sound_process_output_format:");
LOG(LOG_LEVEL_INFO, " wFormatNo %d", aindex);
LOG(LOG_LEVEL_INFO, " wFormatTag %s", audin_wave_format_tag_to_str(wFormatTag));
LOG(LOG_LEVEL_INFO, " nChannels %d", nChannels);
LOG(LOG_LEVEL_INFO, " nSamplesPerSec %d", nSamplesPerSec);
@ -898,6 +899,8 @@ sound_send_wave_data_chunk(char *data, int data_bytes)
format_index = g_current_client_format_index;
data_bytes = sound_wave_compress(data, data_bytes, &format_index);
LOG(LOG_LEVEL_TRACE, "sound_send_wave_data_chunk: wFormatNo %d", format_index);
/* part one of 2 PDU wave info */
LOG_DEVEL(LOG_LEVEL_DEBUG, "sound_send_wave_data_chunk: sending %d bytes", data_bytes);
@ -1057,7 +1060,7 @@ sound_process_wave_confirm(struct stream *s, int size)
in_uint8(s, cConfirmedBlockNo);
time_diff = time - g_sent_time[cConfirmedBlockNo & 0xff];
LOG(LOG_LEVEL_DEBUG, "sound_process_wave_confirm: wTimeStamp %d, "
LOG(LOG_LEVEL_TRACE, "sound_process_wave_confirm: wTimeStamp %d, "
"cConfirmedBlockNo %d time diff %d",
wTimeStamp, cConfirmedBlockNo, time_diff);