Which thread to use for audio decoding?
When working with audio playback I am used to the following pattern:

 - one disk (or network) thread which reads data from disk (or the network) and fills a ringbuffer
 - one audio thread which reads data from the ringbuffer, possibly performs DSP, and writes to audio hardware
   (pull or push API)

This works fine, and there's no issue when working with, say, a WAV file.

Now, if the source data is encoded in a compressed format, like Vorbis or MP3, decoding takes some time.

And it seems like it's quite common to perform decoding in the disk/network thread. 

But isn't this wrong design? While disk or network access blocks, some CPU time is available for decoding, but is wasted if decoding happens in the same thread.

Shouldn't decoding be performed in the audio thread?

In my context, I would prefer to avoid adding a dedicated decoding thread. It's for mobile platforms and SMP is pretty rare right now. But please tell if a dedicated decoding thread really makes sense to you.
Which thread to use for audio decoding?
===

When working with audio playback I am used to the following pattern:

 - one disk (or network) thread which reads data from disk (or the network) and fills a ringbuffer
 - one audio thread which reads data from the ringbuffer, possibly performs DSP, and writes to audio hardware
   (pull or push API)

This works fine, and there's no issue when working with, say, a WAV file.

Now, if the source data is encoded in a compressed format, like Vorbis or MP3, decoding takes some time.

And it seems like it's quite common to perform decoding in the disk/network thread. 

But isn't this wrong design? While disk or network access blocks, some CPU time is available for decoding, but is wasted if decoding happens in the same thread.

Shouldn't decoding be performed in the audio thread?

In my context, I would prefer to avoid adding a dedicated decoding thread. It's for mobile platforms and SMP is pretty rare right now. But please tell if a dedicated decoding thread really makes sense to you.