3

I am using EZAudio to playback streaming audio data. Here is the graph: AUConverter -> MultiChannelMixer -> Output. The converter is configured such that it converts audio data with a sampling rate of 48000 to device sampling rate (normally 44100). The audio data will be written into a converter node

AURenderCallbackStruct converterCallback;
    converterCallback.inputProc = EZOutputConverterInputCallback;
    converterCallback.inputProcRefCon = (__bridge void *)(self);
    [EZAudioUtilities checkResult:AUGraphSetNodeInputCallback(self.info->graph,
                                                              self.info->converterNodeInfo.node,
                                                              0,
                                                              &converterCallback)
                        operation:"Failed to set render callback on converter node"];

This graph works well with iphone's speakers. But when I select a bluetooth device, the callback is no longer triggered and no audio is played. If I remove the converter node, I can play the audio again with a bluetooth device, but the sound quality is terrible. Please help, what am I missing in order to play audio in a bluetooth device.

Thanks.

Pandalover
  • 2,388
  • 3
  • 21
  • 19
sahara108
  • 2,829
  • 1
  • 22
  • 41

0 Answers0