Fix OSS Input/Output on M17 8K Sample; #152

This commit is contained in:
lwvmobile 2023-07-08 23:58:43 -04:00
parent af612c058b
commit 343512e9bf
1 changed files with 4 additions and 3 deletions

View File

@ -2474,9 +2474,6 @@ main (int argc, char **argv)
int fmt;
int speed = 48000;
//Codec2 only running at 8k output currently, need to match for OSS
if (opts.frame_m17 == 1)
speed = 8000;
//NOTE: Both /dev/audio AND /dev/dsp randomly open multiple input streams in Linux under padsp wrapper
if((strncmp(opts.audio_in_dev, "/dev/audio", 10) == 0))
@ -2525,6 +2522,10 @@ main (int argc, char **argv)
opts.audio_in_type = 5; //5 will become OSS input type
}
//Codec2 only running at 8k output currently, need to match for OSS
if (opts.frame_m17 == 1)
speed = 8000;
if((strncmp(opts.audio_out_dev, "/dev/audio", 10) == 0))
{
sprintf (opts.audio_out_dev, "%s", "/dev/dsp");