-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, I was wondering if anyone had any advice on an audio library that is better suited to be paired with Celt in terms of latency. I'm working on an application that I would like to have running on both windows/Linux systems. I started by using the OpenAL library but I have run into an issue when feeding OpenAL small mono sample sizes that are 512 samples or less(1024 bytes). Even if I create a ridiculous amount of buffers the playback is not correct. I corrected the issue but it required that I create a second buffer that can hold around 2048 samples. My goal is to achieve the lowest latency possible. Thank you Mike -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFNAqnKpGjaTtTHkDcRAi+cAKCIWBNLujh036LvVlEyYC3NWl6mJACfaJ0w MHCtHZinnlMpwk4to44yHhs=kzKU -----END PGP SIGNATURE-----
Hi, Unfortunately, I think the only way I know of achieving very low latency is to write low-level code and minimize the abstraction layers. At some point, it's likely that your code would have to become somewhat soundcard-specific too because not all soundcards do the buffering the same way and you'll want to adapt to the soundcard buffer rather than let an abstraction layer handle it through more buffering. That's my experience anyway. Jean-Marc mike <mike at baseforsale.com> a ?crit?:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi all, > > I was wondering if anyone had any advice on an audio library that is > better suited to be paired with Celt in terms of latency. I'm working > on an application that I would like to have running on both > windows/Linux systems. I started by using the OpenAL library but I have > run into an issue when feeding OpenAL small mono sample sizes that are > 512 samples or less(1024 bytes). Even if I create a ridiculous amount > of buffers the playback is not correct. I corrected the issue but it > required that I create a second buffer that can hold around 2048 > samples. My goal is to achieve the lowest latency possible. > > > Thank you > Mike > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iD8DBQFNAqnKpGjaTtTHkDcRAi+cAKCIWBNLujh036LvVlEyYC3NWl6mJACfaJ0w > MHCtHZinnlMpwk4to44yHhs> =kzKU > -----END PGP SIGNATURE----- > _______________________________________________ > celt-dev mailing list > celt-dev at xiph.org > http://lists.xiph.org/mailman/listinfo/celt-dev > >
mike wrote:> I was wondering if anyone had any advice on an audio library that is > better suited to be paired with Celt in terms of latency. I'm working > on an application that I would like to have running on both > windows/Linux systems. I started by using the OpenAL library but I have > run into an issue when feeding OpenAL small mono sample sizes that are > 512 samples or less(1024 bytes). Even if I create a ridiculous amount > of buffers the playback is not correct. I corrected the issue but it > required that I create a second buffer that can hold around 2048 > samples. My goal is to achieve the lowest latency possible.Hi Mike PortAudio (http://www.portaudio.com) can do that. It's a cross-platform open source library. I'm one of the lead developers. I use PortAudio and CELT in a low latency network audio server I'm building. I use ASIO drivers with an RME soundcard with 256 frame buffers (5.8ms at 44.1k). The RME hardware can deliver much lower latencies/buffer sizes. But for my application I'm using 256 sample CELT frames so it doesn't make sense to go lower. PortAudio is a thin wrapper around native low latency platform audio APIs such as ALSA on Linux and ASIO on Windows (among others such as WMME, DirectSound, WASAPI, OSS, CoreAudio on Mac etc). One of the primary goals is to support low-latency audio processing applications (DSP effects processors for musical applications) where low latency is mission critical. The API overview is here: http://www.portaudio.com/docs/v19-doxydocs/api_overview.html Configuring PortAudio to use the absolute lowest latency can be a little bit fiddly, but it's usually a lot easier than learning and using the native APIs directly. On Windows you need to know what you're doing to get lowest latency audio -- you need to target the right native audio APIs since the legacy APIs (especially WMME and DirectSound) introduce additional latency internally. Vista introduced a new low latency audio API (WASAPI) but this only delivers low latency reliably in 64 bit Apps I think (on Vista at least). Usually I'd advise targetting ASIO if you can guarantee that your users will install a driver -- all pro/prosumer audio hardware provides ASIO drivers and there is the ASIO4ALL driver for generic WDM audio hardware. In any case, with PortAudio you can let your users direct audio to whatever audio interfaces/drivers they have installed. There are some recent threads in the PortAudio mailing list archives about Windows low latency. I'm not an expert on WASAPI or ALSA but if you drop by the PortAudio mailing list I'm sure other people will be able to answer your questions. HTH Ross.
Hi Mike, You could give fmod a go - it supports celt encoding out of the box, the mixer dsp buffer size is configurable (you can get it down to whatever you want - ie i've used 32x2 samples on asio and WASAPI is just as good), the celt format support is set at 512 samples (for performance - the cpu usage starts to climb heavily the smaller the frame size). The convenient part is there is no code to write - just 'init'/'load'/'play'. Windows supports wasapi/dsound/winmm/asio and linux supports alsa/oss/esd and pulse. Regards, Brett Paterson | CEO FMOD by Firelight Technologies Pty Ltd Interactive Audio Middleware | www.fmod.org PH: +61 3 96635947 Fax: +61 3 96635951 -----Original Message----- From: celt-dev-bounces at xiph.org [mailto:celt-dev-bounces at xiph.org] On Behalf Of mike Sent: Saturday, 11 December 2010 9:30 AM To: celt-dev at xiph.org Subject: [CELT-dev] Cross Platform Audio Library -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, I was wondering if anyone had any advice on an audio library that is better suited to be paired with Celt in terms of latency. I'm working on an application that I would like to have running on both windows/Linux systems. I started by using the OpenAL library but I have run into an issue when feeding OpenAL small mono sample sizes that are 512 samples or less(1024 bytes). Even if I create a ridiculous amount of buffers the playback is not correct. I corrected the issue but it required that I create a second buffer that can hold around 2048 samples. My goal is to achieve the lowest latency possible. Thank you Mike -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFNAqnKpGjaTtTHkDcRAi+cAKCIWBNLujh036LvVlEyYC3NWl6mJACfaJ0w MHCtHZinnlMpwk4to44yHhs=kzKU -----END PGP SIGNATURE----- _______________________________________________ celt-dev mailing list celt-dev at xiph.org http://lists.xiph.org/mailman/listinfo/celt-dev