Skip to contentSkip to conversation

Software mixing according to priority of streams

DISCUSSION Nobin Mathew 3 participants 9 messages Jun 15, 2007

lore
Share & tools
lore
#0 lore raw

Hi,

Is there any sound mixer which does mixing according to priority of streams, i.e. i will have streams with different priority like audio stream , bluettoth sco stream, gps navigation sound stream etc. Since my hardware will not support hardware mixing i will have to do this mixing in software.

If bluetooth sco stream is opened while audio stream is playing then the application
(sound server) should stop the playback of audio stream and should start playback of bletooth sco stream.

priority order is
bluettoth sco > gps navigation sound > audio

Can dmix and Jack server the purpose.

Nobin Mathew

#1 lore raw

Can somebody throw some ideas on this ?

Quoted 20 lines · Nobin Mathew

Hi,

Is there any sound mixer which does mixing according to priority of streams, i.e. i will have streams with different priority like audio stream , bluettoth sco stream, gps navigation sound stream etc. Since my hardware will not support hardware mixing i will have to do this mixing in software.

If bluetooth sco stream is opened while audio stream is playing then the application
(sound server) should stop the playback of audio stream and should start playback of bletooth sco stream.

priority order is
bluettoth sco > gps navigation sound > audio

Can dmix and Jack server the purpose.

Nobin Mathew

#2 lore raw
Quoted 1 line · Nobin Mathew

Can somebody throw some ideas on this ?

I don't understand your use case. Are you saying you want to start a playback app (say mplayer) and have the audio switch between devices? That's impossible.

If you just want to be able to play audio from multiple apps through the same device, then yes, dmix or jack can do it.

Lee

#3 lore raw

A sound server can do this

Maintain a buffer per application ,
and each buffer will have priority. when data comes on higher priority buffer stop taking data from low priority buffer, and configure the audio and start pumping data from high priority buffer.

Quoted 12 lines · Lee Revell
Quoted 1 line · Nobin Mathew

Can somebody throw some ideas on this ?

I don't understand your use case. Are you saying you want to start a playback app (say mplayer) and have the audio switch between devices? That's impossible.

If you just want to be able to play audio from multiple apps through the same device, then yes, dmix or jack can do it.

Lee

#4 lore raw

Yes i have multiple applications.

say mplayer for audio stream.
bluetooth app for bluetooth sco stream
RoadNav for GPS navigation voice data

priority we require is

mplayer < RoadNav < bluetooth sco

so when bluetooth sco apps starts no more mplayer stream data should go to codec till the sco app stops.

Quoted 22 lines · Nobin Mathew

A sound server can do this

Maintain a buffer per application ,
and each buffer will have priority. when data comes on higher priority buffer stop taking data from low priority buffer, and configure the audio and start pumping data from high priority buffer.

Quoted 12 lines · Lee Revell
Quoted 1 line · Nobin Mathew

Can somebody throw some ideas on this ?

I don't understand your use case. Are you saying you want to start a playback app (say mplayer) and have the audio switch between devices? That's impossible.

If you just want to be able to play audio from multiple apps through the same device, then yes, dmix or jack can do it.

Lee

#5 lore raw
In reply to Nobin Mathew

Hi Nobin,

Quoted 7 lines · Nobin Mathew

A sound server can do this

Maintain a buffer per application ,
and each buffer will have priority. when data comes on higher priority buffer stop taking data from low priority buffer, and configure the audio and start pumping data from high priority buffer.

Not to stray too far OT here, but take a look at the message in the link below from the PulseAudio mailing list. Sounds like the type of thing you're looking for (although I don't think any patches have been submitted yet).

https://tango.0pointer.de/pipermail/pulseaudio-discuss/2007-May/000389.html

Cheers,
Seth

#6 lore raw

yes this is what i need

Quoted 21 lines · Seth Forshee

Hi Nobin,

Quoted 7 lines · Nobin Mathew

A sound server can do this

Maintain a buffer per application ,
and each buffer will have priority. when data comes on higher priority buffer stop taking data from low priority buffer, and configure the audio and start pumping data from high priority buffer.

Not to stray too far OT here, but take a look at the message in the link below from the PulseAudio mailing list. Sounds like the type of thing you're looking for (although I don't think any patches have been submitted yet).

https://tango.0pointer.de/pipermail/pulseaudio-discuss/2007-May/000389.html

Cheers,
Seth

#7 lore raw
In reply to Nobin Mathew
Quoted 6 lines · Nobin Mathew

A sound server can do this

Maintain a buffer per application ,
and each buffer will have priority. when data comes on higher priority buffer stop taking data from low priority buffer, and configure the audio and start pumping data from high priority buffer.

Ah, so you do NOT want software mixing - you want the low priority stream to stop when the high priority stream starts.

Lee

#8 lore raw

yes, i thought only software mixing can do it

Quoted 13 lines · Lee Revell
Quoted 6 lines · Nobin Mathew

A sound server can do this

Maintain a buffer per application ,
and each buffer will have priority. when data comes on higher priority buffer stop taking data from low priority buffer, and configure the audio and start pumping data from high priority buffer.

Ah, so you do NOT want software mixing - you want the low priority stream to stop when the high priority stream starts.

Lee