diff options
author | sletz <sletz@0c269be4-1314-0410-8aa9-9f06e86f4224> | 2009-03-03 15:35:15 +0000 |
---|---|---|
committer | sletz <sletz@0c269be4-1314-0410-8aa9-9f06e86f4224> | 2009-03-03 15:35:15 +0000 |
commit | 5a72bbae787a021b9bca4bf8fe7ca3da45cb6154 (patch) | |
tree | d15f3dfa1b274a6c65d96416ce361eb7914ea57f /solaris | |
parent | e28ff7a6f594dd308e1ce28f32a65462a0857825 (diff) | |
download | jack2-5a72bbae787a021b9bca4bf8fe7ca3da45cb6154.tar.gz |
Cleanup JackOSSDriver code.
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3392 0c269be4-1314-0410-8aa9-9f06e86f4224
Diffstat (limited to 'solaris')
-rw-r--r-- | solaris/oss/JackOSSDriver.cpp | 57 |
1 files changed, 2 insertions, 55 deletions
diff --git a/solaris/oss/JackOSSDriver.cpp b/solaris/oss/JackOSSDriver.cpp index f70aaaac..46a2871a 100644 --- a/solaris/oss/JackOSSDriver.cpp +++ b/solaris/oss/JackOSSDriver.cpp @@ -223,34 +223,7 @@ void JackOSSDriver::DisplayDeviceInfo() if (cap & DSP_CAP_BIND) jack_info(" DSP_CAP_BIND"); } } - /* - TODO - - ai_in.dev = fInFD; - jack_log("JackOSSDriver::DisplayDeviceInfo input fInFD = %d", ai_in.dev); - if (ioctl(fInFD, SNDCTL_AUDIOINFO, &ai_in) != -1) { - jack_info("Using audio engine %d = %s for input", ai_in.dev, ai_in.name); - if (ai_in.iformats & AFMT_S24_NE) - jack_info("Available input format : AFMT_S24_NE"); - if (ai_in.iformats & AFMT_S16_NE) - jack_info("Available input format : AFMT_S16_NE"); - if (ai_in.iformats & AFMT_S32_NE) - jack_info("Available input format : AFMT_S32_NE"); - } - - ai_out.dev = fOutFD; - jack_log("JackOSSDriver::DisplayDeviceInfo output fOutFD = %d", ai_out.dev); - if (ioctl(fOutFD, SNDCTL_AUDIOINFO, &ai_out) != -1) { - jack_info("Using audio engine %d = %s for output", ai_out.dev, ai_out.name); - if (ai_out.oformats & AFMT_S24_NE) - jack_info("Available output format : AFMT_S24_NE"); - if (ai_out.oformats & AFMT_S16_NE) - jack_info("Available output format : AFMT_S16_NE"); - if (ai_out.oformats & AFMT_S32_NE) - jack_info("Available output format : AFMT_S32_NE"); - } - */ - + if (ai_in.rate_source != ai_out.rate_source) { jack_info("Warning : input and output are not necessarily driven by the same clock!"); } @@ -541,7 +514,7 @@ int JackOSSDriver::OpenAux() // In duplex mode, check that input and output use the same buffer size /* - // 10/02/09 : desactivated for now, needs more check (only needed when *same* device is used for input and output ??) + 10/02/09 : desactivated for now, needs more check (only needed when *same* device is used for input and output ??) if ((fRWMode & kRead) && (fRWMode & kWrite) && (fInputBufferSize != fOutputBufferSize)) { jack_error("JackOSSDriver::OpenAux input and output buffer size are not the same!!"); @@ -583,32 +556,6 @@ int JackOSSDriver::Read() } ssize_t count; -/* - // Maybe necessary to write an empty output buffer first time : see http://manuals.opensound.com/developer/fulldup.c.html - if (fFirstCycle) { - - fFirstCycle = false; - memset(fOutputBuffer, 0, fOutputBufferSize); - - // Prefill ouput buffer - for (int i = 0; i < fNperiods; i++) { - count = ::write(fOutFD, fOutputBuffer, fOutputBufferSize); - if (count < fOutputBufferSize) { - jack_error("JackOSSDriver::Write error bytes written = %ld", count); - return -1; - } - } - - int delay; - if (ioctl(fOutFD, SNDCTL_DSP_GETODELAY, &delay) == -1) { - jack_error("JackOSSDriver::Write error get out delay : %s@%i, errno = %d", __FILE__, __LINE__, errno); - return -1; - } - - delay /= fSampleSize * fPlaybackChannels; - jack_info("JackOSSDriver::Write output latency frames = %ld", delay); - } -*/ #ifdef JACK_MONITOR gCycleTable.fTable[gCycleCount].fBeforeRead = GetMicroSeconds(); |