void Audio_Queue::audioQueueIsRunningCallback(void *inClientData, AudioQueueRef inAQ, AudioQueuePropertyID inID) { Audio_Queue *audioQueue = static_cast<Audio_Queue*>(inClientData); UInt32 running; UInt32 size; OSStatus err = AudioQueueGetProperty(inAQ, kAudioQueueProperty_IsRunning, &running, &size); if (err) { AQ_TRACE("error in kAudioQueueProperty_IsRunning"); audioQueue->setState(IDLE); audioQueue->m_lastError = err; return; } if (running) { audioQueue->setState(RUNNING); } else { audioQueue->setState(IDLE); } }
void Audio_Queue::audioQueueIsRunningCallback(void *inClientData, AudioQueueRef inAQ, AudioQueuePropertyID inID) { Audio_Queue *audioQueue = static_cast<Audio_Queue*>(inClientData); AQ_TRACE("%s: enter\n", __PRETTY_FUNCTION__); UInt32 running; UInt32 output = sizeof(running); OSStatus err = AudioQueueGetProperty(inAQ, kAudioQueueProperty_IsRunning, &running, &output); if (err) { AQ_TRACE("%s: error in kAudioQueueProperty_IsRunning\n", __PRETTY_FUNCTION__); return; } if (running) { AQ_TRACE("audio queue running!\n"); audioQueue->setState(RUNNING); } else { audioQueue->setState(IDLE); } }