Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions drivers/oss/oss_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down Expand Up @@ -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));
Expand Down