libZPlay documentation (Win32)
IndexReferenceHome
PreviousUpNext
libZPlayCpp::zplay_SetWaveOutDevice Function

Set wave out device for this interface instance.

C++
__stdcall __declspec(dllimport) int zplay_SetWaveOutDevice(ZPLAY_HANDLE handle, unsigned int nIndex);
Parameters 
Description 
ZPLAY_HANDLE handle 
ZPLAY handle. Get this handle with zplay_CreateZPlay
unsigned int nIndex 
Index of wave out device. Call EnumerateWaveOut or zplay_EnumerateWaveOutto get number of wave out devices. Index value is in range from 0 to num_of_devices - 1.
Note: There is special index value WaveOutWaveMapper
Return Values 
Description 
All OK. 
Error. To get error message read here

User can specify wave out device for each interface instance. If you have multiple soundcards, with this function you can specify output soundcard. You can also create 2 interface instances and play 2 songs, each song on different soundcard. 

Default wave output is set to WaveOutWaveMapper (class is using waveform-audio output device capable of playing the given format). 

This function has effect on next call to play function. If you call this function while song is playing there is no effect. You need to stop playing and start playing again to apply new settings.

Set wave output to wave mapper (default setting). 

ZPlay C++ Class interface  

instance->SetWaveOutDevice(WaveOutWaveMapper);

 

C Style interface

zplay_SetWaveOutDevice(instance, WaveOutWaveMapper);
Copyright (c) 2010. Zoran Cindori - All rights reserved.

Web: http://libzplay.sourceforge.net/

Email: zcindori@inet.hr