Browse Source

Added the checks for a match of actual and requested sample-rates in the OSS driver.

Fail in case of a sample rate mimatch.
Error message recommends using --enable-oss-cookedmode in case of a mismatch.
pull/70/head
Yuri 8 years ago
parent
commit
08c6f50706
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      drivers/oss/oss_driver.c

+ 14
- 0
drivers/oss/oss_driver.c View File

@@ -569,6 +569,13 @@ static int oss_driver_start (oss_driver_t *driver)
"OSS: failed to set samplerate for %s: %s@%i, errno=%d",
indev, __FILE__, __LINE__, errno);
}
if (samplerate != driver->sample_rate) {
jack_error (
"OSS: failed to set the recording sample-rate for %s: %s@%i, requested-sample-rate=%d, obtained-sample-rate=%d",
indev, __FILE__, __LINE__, driver->sample_rate, samplerate);
jack_error ("OSS: please consider configuring with --enable-oss-cookedmode");
return -1;
}
jack_info ("oss_driver: %s : 0x%x/%i/%i (%i)", indev,
format, channels, samplerate, get_fragment (infd));

@@ -608,6 +615,13 @@ static int oss_driver_start (oss_driver_t *driver)
"OSS: failed to set samplerate for %s: %s@%i, errno=%d",
outdev, __FILE__, __LINE__, errno);
}
if (samplerate != driver->sample_rate) {
jack_error (
"OSS: failed to set the playback sample-rate for %s: %s@%i, requested-sample-rate=%d, obtained-sample-rate=%d",
indev, __FILE__, __LINE__, driver->sample_rate, samplerate);
jack_error ("OSS: please consider configuring with --enable-oss-cookedmode");
return -1;
}
jack_info ("oss_driver: %s : 0x%x/%i/%i (%i)", outdev,
format, channels, samplerate,
get_fragment (outfd));


Loading…
Cancel
Save