I can't think of much more to say... so download it here.
You might want to look at my mpeg radio braodcasting system or my decidedly more mundane home page
Scott's Mp3 Mixer v0.01
This is a reconstruction of an old piece of software I used to have,
basic idea is to let you mix 2 audio streams generated from mpeg audio
files with volume and speed control.
The code is basically a wrapper which uses mpg123 to actually decode
mpeg files to raw audio data. The programme then applies the speed control
and mixes the two audio streams.
Because sustaining the throughput requires a lot of process switching
need a reasonably high spec machine to keep the audio pipe fed. Because there
is a buffer for talking to the sound card there is a perceptible delay
between hitting a kety and the output changing. It's possible to shrink the
buffer and reduce this delay, but the smaller the buffer the more likley
there will be skips due to the buffer running dry.
This is a quick hack (about an hour and a half) I may improve it...
You *Need* mpg123 to use this - get it from http://mpg.123.org
compile mpg123 and put it somewhere in your path.
compile the programme.
run it with all the mpeg audio files you want to use on teh command line.
then control overythign from the keyboard.....
'+' - Quit
'1','q','w' - select file for channel 1
'a','z','x' - select file for channel 2
'2' - Start/stop channel 1
's' - Start/stop channel 2
'3','e' - Volume control on channel 1
'd','c' - Volume control on Channel 2
'4','r' - Speed Control on Channel 1
'f','v' - Speed Control on Channel 2
That's all that's implemented so far.
I'm so far too lazy to deal with variable sample rates - 44.1kHz in stereo 16
bit is all I suuport, if your files are different then they will sound
The speed control works by skipping samples - not particularyly high quality.
The volume has a smooth clipping algorithm implemented - this means
single track will show some distortion - but it sounds a lot better when you're
mixing multiple tracks.
Command recording - so you don't need to play everyhting live.
interface to mp3serv radio to let you braodcast.
microphone mute to let you speak over recordings.
proper level meter.
Integrate mpg123 code into binary.