ios 播放ogg格式音频,以及AudioQueue播放速率问题


ios 端播放ogg audio


https://github.com/cczufish/oggplayer_swift


AudioQueue播放速度速率问题

https://github.com/Jerry0523/AudioQueueServiceDemo/blob/675fe707c2c93702036b776ee2aa8b3de27a4a6b/JWAudioHelper/AudioPlayerOutput.cpp

https://github.com/wuwulailai/myplayer/blob/1439b2b16d3c63afad93606b07696716fff3eb5d/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioQueueController.m

https://developer.apple.com/library/archive/documentation/MusicAudio/Conceptual/AudioQueueProgrammingGuide/AQPlayback/PlayingAudio.html

http://msching.github.io/blog/2014/08/02/audio-in-ios-5/


https://developer.apple.com/documentation/audiotoolbox/1552626-audio_queue_parameters/kaudioqueueparam_playrate?language=objc


        UInt32 enabled = 1;
        AudioQueueSetProperty(mQueue, kAudioQueueProperty_EnableTimePitch, &enabled, 4);
        UInt32 timePitchAlgorithm = kAudioQueueTimePitchAlgorithm_Spectral; // supports rate and pitch
        AudioQueueSetProperty(mQueue, kAudioQueueProperty_TimePitchAlgorithm, &timePitchAlgorithm, sizeof(timePitchAlgorithm));


        AudioQueueSetParameter(mQueue, kAudioQueueParam_PlayRate, rate);
        UInt32 propValue = 1;
        AudioQueueSetProperty(mQueue, kAudioQueueProperty_EnableTimePitch, &propValue, sizeof(propValue));







Loading Disqus comments...
Table of Contents