Multiple PCM files
Ok set the option ( you guessed it Outlook Express ) to text only. Sorry don't have a go at me as it is the default setting I believe.
Option 1 or 2 would be what I am looking at. What I have is a program with multiple threads needing to play PCM streams to the same device.
Thanks and sorry for the HTML.
Cheers
Nick
----- Original Message -----
From: "Paul Davis" <[email protected]>
To: "Nick French" <[email protected]>
Cc: <[email protected]>
Sent: Tuesday, July 30, 2002 11:11 AM
Subject: Re: [Alsa-devel] Multiple PCM files
Quoted 30 lines
Quoted 1 line
Sorry I am new to ALSA so forgive me if this is obvious.
don't be sorry about that. instead, be sorry for this: whether you know it or not, the email program you are using is sending out copies of your mail in both plain text and HTML formats. increasingly on the net, there are filters being put in place that silently dump HTML-formatted email. some mailing lists will not ever accept such posts. as long as you do this, you are (1) wasting network bandwidth by sending messages that are typically more than twice as long as they could be (2) making it harder for people using traditional email readers to read them (3) risking the chance that people will never see your mail because its filtered before reaching their email inbox.
Quoted 4 lines
Is there any way with ALSA to play multiple PCM files at the same time. = Say for example under OSS open DSP0 and DSP1. I thought I read that it = could but have only found samples for playing a single PCM stream. Any = pointers gratefully appreciated.
Your question isn't very well defined. There are several things you might be thinking of:
1) a single process playing multiple audio files to a single audio interface
2) multiple processes playing multiple audio files to a single audio interface
3) multiple processes playing multiple audio files to multiple audio interfaces
4) a single process playing multiple audio files to multiple audio interfaces
Quoted 6 lines
tell us which one it is, and we can provide more specific help. the use of
/dev/dsp0and/dev/dsp1under OSS corresponds to either 3 or 4 in the list above, but its not clear which.--p
-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
Quoted 5 lines
Ok set the option ( you guessed it Outlook Express ) to text only. Sorry don't have a go at me as it is the default setting I believe.
Option 1 or 2 would be what I am looking at. What I have is a program with multiple threads needing to play PCM streams to the same device.
there are some hardware interfaces that support "multi-open", meaning that several calls to snd_pcm_open() can be made to the same named device (e.g. "plughw:0,0"). these interfaces have a hardware mixer that mixes all the streams together before delivering them to the connectors on the back. on these devices, each thread could open the device, and do its own writing.
there are other interfaces that have more than one PCM output device. for example, some have "front" and "back" devices, or "analog" and "spdif" devices. these are distinct PCM devices that can be accessed independently from each other. this is basically what you were using when you used /dev/dsp0 and /dev/dsp1 (assuming you had only one audio interface installed).
however, you cannot rely on such interfaces in general - there are many that do not support either of these functions, and your software will not work if you were to use it on such hardware. this might not matter to you if your software is only for your own use.
so, instead you need to provide your own internal mixer. your own threads write into buffers, and then a single thread mixes it together and delivers it via snd_pcm_write or its cousins and uncles.
--p
ps. personally, as everyone here knows, i would recommend that you use JACK (jackit.sf.net) and forget about the ALSA layer, but that's your choice. JACK doesn't make a design with multiple threads delivering the data any simpler, but it gets rid of all the ALSA device/hardware related stuff and replaces it with a very simple abstraction.
-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31