Audio Support of Symbian OS
Symbian OS offers various ways to play audio data (Nokia 2005b; Nokia 2005a). For the purpose of porting STK, the streaming of data buffers is needed. Symbian OS provides such streaming capability, which in its interface architecture closely mimicks the interface of RTAudio (Scavone and Cook 2005).1] Streaming Audio Output
The class responsible for real-time audio output streaming is called CMdaAudioOutputStream and it needs to be used from a class which implements the MMdaAudioOutputStreamCallback interface. The callback interface will be called when the playback stream enters various states, including(1) finishing opening the stream,
(2) when the latest data buffer has been copied to the playback hardware, and
(3) when the stream closes. The second callback closely corresponds to the callback that RTAudio uses to pull data for playback.
A client class using Mobile STK for Symbian can call sample generating functions of STK classes (the so-called “tick”-methods (Scavone and Cook 2005)) or combination of such classes. We implemented double buffering as Symbian does not copy the user supplied buffer nor does it lock the memory for write access while playing back. Hence ticking will fill one buffer after the one currently being copied, introducing an additional latency of one buffer length on top of the latency introduced by the buffer copying and inherent audio streaming implementation.
2] Prospects for RTAudio and RTMidi ports
Gary Scavone’s RTAudio and RTMidi (Scavone 2002; Scavone and Cook 2005) is closely tied with STK, though in principle stand-alone. At the current time the port for Symbian OS does not include a port of RTAudio and RTMidi. However at least a partial port of this project into RTAudio is plannedto make the audio interfacing that now is available for STK also independently available for other audio application efforts while keeping the unified interface that RTAudio provides. The authors are unaware of any availability of a hardware MIDI interface for Symbian-enabled mobile phones, hence there are no plans to port RTMidi
0 comments:
Post a Comment