198.54.202.234
This Post Has Been Edited by the Author
cPlay The open source high-end audio player using ASIO May 2008 cPlay delivers high quality audio playback using ASIO 2. Playback is achieved using any ASIO compatible soundcard. cPlay is a minimalist audio player using the latest high quality SRC resampler (Best Sinc SNR 145.68db or 121.33db) or SoX (VHQ or HQ). cPlay’s design offers state-of-the-art ASIO-only playback and caters for touch screen users. Installation, setup and use is easy. cPlay is built in c/c++ and operates on Windows XP SP2 Professional (32 bit).
FEATURES
- Resampling is sourced from LibSampleRate (version 0.1.5) and SoX 14.2.0 under GNU GPL license. LibSampleRate is aka SRC (Secret Rabbit Code) and supersedes the version as used in foobar2000. Best Sinc converter now offers a SNR of 145.68db or 121.33db (versus 97db). SoX VHQ offers better than 170db SNR. Resampling is bypassed when input rate matches output.
- Supports Steinberg’s excellent ASIO 2 and is backward compatible to prior ASIO versions (as required by ASIO drivers).
- Offers high quality 64 bit double precision digital volume control (in 0.5db steps). This can be bypassed.
- Playback is achieved through .cue, .wav or .flac files. cPlay loads entire .wav or .flac (decoded) into RAM before starting. Playback is done directly from cPlay’s internal buffer. Cue playback requires .cue files as created by EAC (single or multi file standard).
- Ensures efficient CPU resource utilization allowing for low specification processors or high levels of upsampling. This means CPU’s can be underclocked / undervolted.
- Supports up to 3 ASIO soundcards with each having up to 100 output channels.
- Advanced optimizations are applied (if available from ASIO driver) during playback.
- Best results achieved when using cMP (i.e. cMP˛). This allows for low level Windows optimizations. Use cMP release 1.0 final or later – this allows for bypassing RAM load in cMP (set RAM Load in cMP Settings to No) otherwise wav file is RAM loaded twice. cPlay allows for both svchost and lsass to be suspended during playback thus reducing the Windows footprint. Only exception is EMU’s ASIO driver which requires both (svchost and lsass) to be operational. Set cMP’s ‘Optimize’ setting to ‘Critical’.
- Full remote control is achieved with cMP: offering volume control, track navigation, next/previous and stop/eject via (wireless) mouse.
USER MANUAL
Main
Main screen offers essentials only. Large buttons and fonts makes for excellent touch screen friendliness and operating from a distance. cPlay's desktop icon is used for initial setup and playback. Alternatively, play audio as follows:
- Select .cue or .wav file from File Explorer (double-click on .cue starts cPlay)
- Select 'Open With' (right-click on file to be played)
- Select cicsPlay
Playing audio with RealTime priority:
- Select .cue or .wav file from File Explorer
- Select 'Open With' (right-click on file to be played)
- Locate and select 'cicsPlay.bat' where cPlay was installed (default is 'c:\program files\cics Play'). Note: If you did NOT use the default install folder, edit cicsPlay.bat and correct the path. Hint: use command 'dir *.* /x' to identify folder's DOS shortname.
Initial RAM load takes a few seconds for a typical CD thereafter background loading occurs for subsequent tracks. Using RAID 0 and /or high throughput HDDs (SSDs) will yield faster RAM load times.Settings
Bottom left button in main screen brings up cPlay’s settings. ASIO settings button below depends on ASIO driver – Juli@ has no effect whilst RME, Lynx, EMU and ASIO4ALL gives access to ASIO control panel of driver. cPlay offers 2 channel output mapping only (this is a deliberate design choice).
For some changes to take effect (ASIO, Buffer, AWE and Output Rate), a restart is required. ASIO changes (from cPlay or external) will cause cPlay to stop (and a restart is required). This is an important safety measure.When changing rates (e.g. 96 to 44.1), some ASIO soundcards will re-map its channels – cPlay tries to detect this (depending on ASIO driver) and informs you to reset left & right channels. Why? Soundcards using the ADAT interface use channel multiplexing (i.e. 96k gives 2x48k...) hence channels change with rate.
cMP setting disables file browse button (to prevent indefinite waits in cMP˛).
Buffer
"DSP Buffer" at Auto (default), Small, Medium or Large is provided. Small sets parameters as per cPlay 1.1, Medium as cPlay 1.0 and Auto selects parameters based on output rate.Guidance: CPUs with 2MB+ L2 cache, use Auto setting. Small is ideal for high output rates (above 96k) whilst Medium is best for 96k or lower. On CPUs offering less than 2MB L2 cache, Small is recommended for all output rates. 'Large' buffer setting is used by Auto when output rate is 48k or less. Processors with L2 cache size larger than 2MB, its worth testing Medium and Large settings (for any output rate).
These buffer sizes work best with low ASIO buffer or latency setting (less than 512 samples).
Resampler
- Phase (0-100)
All resamplers use filters that can sometimes create `echo' (a.k.a. `ringing') artefacts with transient signals such as those that occur with `finger snaps' or other highly percussive sounds. Such artefacts are much more noticable to the human ear if they occur before the transient (`pre-echo') than if they occur after it (`post-echo'). Note that frequency of any such artefacts is related to the smaller of the original and new sampling rates but that if this is at least 44.1kHz, then the artefacts will lie outside the range of human hearing.
A phase response setting may be used to control the distribution of any transient echo between `pre' and `post': with minimum phase (0), there is no pre-echo but the longest post-echo; with linear phase (50), pre and post echo are in equal amounts (in signal terms, but not audibility terms); the intermediate phase (25) setting attempts to find the best compromise by selecting a small length (and level) of pre-echo and a medium lengthed post-echo. Note that phase responses between `linear' (50) and `maximum' (50..100) are rarely useful.
- Bandwidth (90-99.7%)
Band-width is the percentage of the audio frequency band that is preserved. A resampler's band-width setting determines how much of the frequency content of the original signal (w.r.t. the orignal sample rate when up-sampling, or the new sample rate when down-sampling) is preserved during conversion. The term `pass-band' is used to refer to all frequencies up to the band-width point (e.g. for 44.1kHz sampling rate, and a resampling band-width of 95%, the pass-band represents frequencies from 0Hz (D.C.) to circa 21kHz). Increasing the resampler's band-width results in a slower conversion and can increase transient echo artefacts (and vice versa).
The -s `steep filter' option (99.0% bandwidth) changes resampling band-width from the default 95% (based on the 3dB point), to 99%. Band-width values greater than 99% are not recommended for normal use as they can cause excessive transient echo.
- (Above Bandwidth) Aliasing
Aliasing above the pass-band is allowed. For example, with 44.1kHz sampling rate, and a resampling band-width of 95%, this means that frequency content above 21kHz can be distorted; however, since this is above the pass-band (i.e. above the highest frequency of interest/audibility), this may not be a problem. The benefits of allowing aliasing are reduced processing time, and reduced (by almost half) transient echo artefacts.
More details and measurements is available under cPlay 2.0b26 Release Notes.
Using AWE
Physical RAM allocation method is used (for WAV RAM LOAD). This advanced technique requires LOCK privilege setting! AWE stands for Address Windowing Extensions - allocation occurs directly (system available RAM drops immediately). Windows may NOT allocate all 'Available RAM' - in which case, cPlay reverts to standard approachDiagnostics will show whether AWE was successful at RAM allocation. Process Explorer or Task Manager will not show RAM allocated to cPlay's working storage, instead you'll see the reduction in Available RAM.
Make sure you have LOCK privileges set on your computer. Windows will not offer all "Available RAM" for AWE - in which case cPlay reverts to standard allocation. Adding additional RAM will prevent this. AWE offers the potential to load up to 4GB of RAM - not tested.
How 2 set LOCK privilege
Perform these steps exactly:
- Start Menu > Run > enter "mmc" > OK button
- File > Add/Remove Snap-in > Add button
- Select "Group Policy Object Editor" > Add button
- Finish button
- Close button
- OK button
- Local Computer Policy > Computer Configuration > Windows Settings > Security Settings > Local Policies > select "User Rights Assignment"
- Double-click "Lock pages in memory"
- Add User or Group button
- Object Types... button
- check Groups > uncheck Built-in security principals & Users > OK button
- Enter "Administrators" under "Enter the object names to select" > OK button
- Apply button > OK button
- File > Save
- File > Exit
- Reboot
Lock privilege is now enabled. If this is not done, cPlay will fail on AWE and revert to standard RAM allocation.SRC @145.68db SNR
cPlay can use the CPU intensive 145.68db SNR upsampler. A word of caution: do NOT attempt to use this on lightweight processors (anything less than E4xxx Core 2 Duo processor). A minimum of 2MB L2 cache is required. For example, the E2140 (1MB L2 cache) and Pentium 4 3GHz (1MB L2 cache) can only accomplish 44.1->48 - anything beyond this results in a locked/slow computer. There's a tradeoff here: more CPU power means more electrical inteference (and increased power consumption) thus reducing benefits of superior upsampling.The E6300 (2MB L2 cache, 1.86GHz) processor just manages to cope with 192k upsampling with CPU load at ~93% (individual CPU core). There's no chance for undervolting / underclocking. cMP˛ using this setup operates with no CPU fan gives CPU temperatures of ~65 celcius - adaquate. In cMP˛, no dropouts occur when Optimize is set to Critical. Upsampling to 96k may allow for undervolting / underclocking. Intel's new E7200 (based on 45nm technology) is an excellent choice offering low power consumption and brutal performance. See here for more details.
Keyboard Actions
- '[' / ']' for Previous / Next
- '-' / '=' for Skip Backwards / Skip Forwards
- ';' for phase 0/180
- '.' for stop
- 'p' for play / pause
- shift+Home for volume up
- shift+End for volume down
- Enter to play highlighted track
- Alt+F4 or Esc for exit
Diagnostics
Incredible detail is provided when diagnostics is activated. Also, when cPlay encounters an error, diagnostics is displayed – it’s always a good idea to scroll to the bottom for important messages.
Here’s the initial startup diagnostics using Juli@:
Both Player (cPlay) and Driver (Juli@) support ASIO version 2.0. Latency at ‘preferred buffer’ level matches output latency (48 samples), output ready & hardware optimizations are done. Any advantage of RME’s off-host processing is negated here. Juli@ passes with flying colors!For RME HDSP9652:
Disappointing to see only support for ASIO 1.0 and actual output latency differs from preferred buffer latency - it’s worse than Juli@. Ideally, both output and buffer latencies should be the same. Output ready & hardware optimizations are done.For EMU 1212M:
This soundcard offers poor latency of 2ms (at any sample rate), preferred buffer latency doesn’t match output latency and no hardware optimization supported. Note that if you have an EMU card installed, do NOT disable it (in device manager) as this causes instability (as drivers remain operational)!GETTING STARTED
Download cPlay’s installer from sourceforge here (1.2MB). Installation and startup is straight forward.
If you don’t have an ASIO compatible soundcard, use ASIO4ALL. Note that ASIO4ALL does not support channel mapping (use default) and can only handle up to 48k sample rate.
Your feedback will help guide cPlay’s future development. Source code (4.1MB) is available via email.
Edits: 05/05/08 07/12/08 09/03/08 05/28/09 07/10/09Follow Ups: