Reputation: 51
I have multiple .wav sound files. My objective is: Play 3 wav files simultaneously using aplay and change the volume, during the play, for each sound. Im using Ubuntu Linux.
Upvotes: 1
Views: 1526
Reputation: 607
aplay does not provide interactive control of the volume. When aplay -i is invoked it allows you to pause and resume playback but not interactively change the volume.
One way to achieve what you want to do is to use an audio player with the dmix audio device. For example if you use mplayer :
mplayer alsa:device=dmix audioFile
Now you can invoke mplayer as many times as you want concurrently playing audio from different files. To turn the audio volume up, press 0 and down press 9.
If your audio files have different formatting, such as word length, sample rates or channels, then you will want to use the plugdmix device like so :
mplayer alsa:device=plugdmix audioFile
Upvotes: 2