Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - playing two wav files simultaneously: (9 Items)
   
playing two wav files simultaneously  
While playing a wav audio file with MME, is it possible to pause the play, then play a wav audio file using the "wave" 
utility?. Using the wave utility two wav files can be played simultaneously, but If I played one wav file via MME, then 
try to play a second wav file using the wave utility, it failed as follows:

SampleRate = 22050, Channels = 1, SampleBits = 8
snd_pcm_plugin_params failed: Invalid atgument 

What could be the reason for this error?.
Re: playing two wav files simultaneously  
We might need more logs. It sounds like the MME is not using a mixer
(hardware or software) device. If you want multiple connections to the
audio device you need to use the software mixer, this should allow the
scenario you listed to work.

Can you post the output of:
ls -al /dev/snd

And also post the contents of mme_data.sql?


Thanks,
Gilles

Re: playing two wav files simultaneously  
Hi Gilles,

Please find attached mme_data.sql. 

output of ls -al /dev/snd:

total 0
-rw-rw-rw-  1 root      root              0 May 13  2011 controlC0
-rw-rw-rw-  1 root      root              0 May 13  2011 mixerC0D0
-rw-rw-rw-  1 root      root              0 May 18 15:22 pcmC0D0c
-rw-rw-rw-  1 root      root              0 May 18 15:22 pcmC0D0p
-rw-rw-rw-  1 root      root              0 May 18 15:22 pcmC0D1c
-rw-rw-rw-  1 root      root              0 May 18 15:22 pcmC0D1p
-rw-rw-rw-  1 root      root              0 May 13  2011 pcmC0D2p
lrw-rw-rw-  1 root      root              0 May 18 15:22 pcmPreferredc -> pcmC0D0c
lrw-rw-rw-  1 root      root              0 May 18 15:22 pcmPreferredp -> pcmC0D2p
Attachment: Text mme_data.sql 23.82 KB
Re: playing two wav files simultaneously  
I think I see the problem. In mme_data.sql you have:
INSERT INTO outputdevices(type, permanent, name, devicepath) VALUES(1, 1,
'output1', 'snd:/dev/snd/pcmC0D0p');

This means MME will use pcmC0D0p.


But wave will use pcmPreferredp, which points to:
 pcmPreferredp -> pcmC0D2p


pcmC0D2p is your software mixer. If you change MME to use pcmPreferredp or
pcmC0D2p it should be able to concurrently playback with the wave utility.


Regards,
Gilles

Re: playing two wav files simultaneously  
Thanks Gilles, it solved the problem. However customer wants to have both outputs behave in the same manner. For example
, if output1 is playing a track session and output2 is playing another track session (both via mme). And output1 is tied
 to the software mixer (pcmC0D2p), when I pause both outputs and play a wave file using the wave utility, output1 will 
work, but output2 will fail as it is not tied to a software mixer. They can't tie it to the same software mixer as 
output1 because they need to play different audio independently.

Is it possible to have two software mixers each tied to a dedicated output?.
Re: playing two wav files simultaneously  
Ramesh,

Can you provide the output of "pidin -p io-audio arg" and "pidin -p io-audio mem", please?

Thank you,

--
Ryan J. Allen
QNX Software Systems

________________________________
From: "Ramesh Vemula" <community-noreply@qnx.com>
To: "general-multimedia" <general-multimedia@community.qnx.com>
Sent: 14 June, 2012 6:01 AM
Subject: Re: playing two wav files simultaneously


Thanks Gilles, it solved the problem. However customer wants to have both outputs behave in the same manner. For example
, if output1 is playing a track session and output2 is playing another track session (both via mme). And output1 is tied
 to the software mixer (pcmC0D2p), when I pause both outputs and play a wave file using the wave utility, output1 will 
work, but output2 will fail as it is not tied to a software mixer. They can't tie it to the same software mixer as 
output1 because they need to play different audio independently.

Is it possible to have two software mixers each tied to a dedicated output?.




_______________________________________________

General
http://community.qnx.com/sf/go/post93656
To cancel your subscription to this discussion, please e-mail general-multimedia-unsubscribe@community.qnx.com

Attachment: HTML sf-attachment-mime2246 1.63 KB
Re: playing two wav files simultaneously  
Ryan,

Please find attached output of the two commands you mentioned.
Attachment: Text io-audio.txt 1.09 KB
Re: playing two wav files simultaneously  
Ramesh,

The intel_hda driver only creates a mixer for one playback device.  If you
want a mixer for both devices you'll have to create a PR for this.
Without a mixer on both devices you will always be limited to one process
sending audio to one of the playback devices.

-- 
Ryan J. Allen
QNX Software Systems

RE: playing two wav files simultaneously  
Thanks Ryan.

-----Original Message-----
From: Ryan Allen [mailto:community-noreply@qnx.com] 
Sent: Tuesday, June 19, 2012 5:50 AM
To: general-multimedia@community.qnx.com
Subject: Re: playing two wav files simultaneously

Ramesh,

The intel_hda driver only creates a mixer for one playback device.  If you want a mixer for both devices you'll have to 
create a PR for this.
Without a mixer on both devices you will always be limited to one process sending audio to one of the playback devices.

--
Ryan J. Allen
QNX Software Systems





_______________________________________________

General
http://community.qnx.com/sf/go/post93745
To cancel your subscription to this discussion, please e-mail general-multimedia-unsubscribe@community.qnx.com