check sound device parameters
This commit is contained in:
parent
d54e816ff4
commit
47921d7fe3
10
sndlock.cpp
10
sndlock.cpp
@ -75,6 +75,16 @@ static void dsp_thread()
|
|||||||
sio_close(hdl);
|
sio_close(hdl);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(par.sig != 1
|
||||||
|
|| par.bits != SND_BITS
|
||||||
|
|| par.pchan != SND_PCHAN
|
||||||
|
|| par.rchan != SND_RCHAN
|
||||||
|
|| par.rate != SND_RATE
|
||||||
|
|| par.le != SIO_LE_NATIVE) {
|
||||||
|
std::cerr << "sound device parameter mismatch" << std::endl;
|
||||||
|
sio_close(hdl);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(!sio_start(hdl)) {
|
if(!sio_start(hdl)) {
|
||||||
std::cerr << "failed to start sound device" << std::endl;
|
std::cerr << "failed to start sound device" << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user