|
@@ -211,10 +211,6 @@ static int StreamCallback(const void* input,
|
|
|
// Dbg("[StreamCallback] InsertAudio to shm_queue success! frameCount:%d and framesize is :%d, and shm_queue length is %d.", frameCount, frm.framesize, audio_cap->shm_queue->GetAudioLens());
|
|
|
//}
|
|
|
|
|
|
- if (!audio_cap->handfree_shm_queue->InsertAudio(&dst_frm)) {
|
|
|
- Dbg("[StreamCallback] InsertAudio to handfree_shm_queue failed! frameCount:%d", frameCount);
|
|
|
- }
|
|
|
-
|
|
|
//if (!audio_cap->salesol_shm_queue->InsertAudio(&dst_frm)) {
|
|
|
// Dbg("[StreamCallback] InsertAudio to salesol_shm_queue failed! frameCount:%d", frameCount);
|
|
|
//}
|
|
@@ -231,13 +227,6 @@ static int StreamCallback(const void* input,
|
|
|
// Dbg("[StreamCallback] InsertAudio to shm_queue success! frameCount:%d and framesize is :%d, and shm_queue length is %d.", frameCount, frm.framesize, audio_cap->shm_queue->GetAudioLens());
|
|
|
//}
|
|
|
|
|
|
- if (!audio_cap->handfree_shm_queue->InsertAudio(&frm)) {
|
|
|
- Dbg("[StreamCallback] InsertAudio to handfree_shm_queue failed! frameCount:%d", frameCount);
|
|
|
- }
|
|
|
- //else {
|
|
|
- // Dbg("[StreamCallback] InsertAudio to handfree_shm_queue success! and framesize is :%d, and handfree_shm_queue length is %d.", frm.framesize, audio_cap->handfree_shm_queue->GetAudioLens());
|
|
|
- //}
|
|
|
-
|
|
|
//if (!audio_cap->salesol_shm_queue->InsertAudio(&frm)) {
|
|
|
// Dbg("[StreamCallback] InsertAudio to salesol_shm_queue failed! frameCount:%d", frameCount);
|
|
|
//}
|
|
@@ -545,14 +534,18 @@ static void audio_data_callback(const void* input, unsigned long audiolen, void*
|
|
|
frm.framesize = RVC_AUDIO_BUFFER_LEN;
|
|
|
frm.nchannels = 1;
|
|
|
frm.samplespersec = 8000;
|
|
|
- frm.iseriesnumber = 0;
|
|
|
+ frm.iseriesnumber = audio_cap->iseriesnumber++;
|
|
|
+
|
|
|
+ if (audio_cap->iseriesnumber >= INT_MAX){
|
|
|
+ audio_cap->iseriesnumber = 0;
|
|
|
+ }
|
|
|
|
|
|
if (!audio_cap->shm_queue->InsertAudio(&frm)) {
|
|
|
- Dbg("[StreamCallback] InsertAudio to shm_queue failed!");
|
|
|
- }
|
|
|
- else {
|
|
|
- //Dbg("[StreamCallback] InsertAudio to shm_queue success! and framesize is :%d, and shm_queue length is %d.", frm.framesize, audio_cap->shm_queue->GetAudioLens());
|
|
|
+ Dbg("%s:%d InsertAudio to shm_queue failed!", __FUNCTION__, __LINE__);
|
|
|
}
|
|
|
+ //else {
|
|
|
+ // Dbg("%s:%d InsertAudio to shm_queue success! and framesize is :%d, and shm_queue length is %d, frm.iseriesnumber = %d.", __FUNCTION__, __LINE__, frm.framesize, audio_cap->shm_queue->GetAudioLens(), frm.iseriesnumber);
|
|
|
+ //}
|
|
|
audio_cap->uaudiolen = 0;
|
|
|
if (ileft > 0){
|
|
|
if (ileft > RVC_AUDIO_BUFFER_LEN){
|