C
compboy said:Thanks, Peter.
I had tried the first method,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
public class CoreLibVol
{
[DllImport("Coredll.dll")]
public static extern bool sndPlaySound(string lpszSoundName, uint
fuSound);
[DllImport("Coredll.dll")]
public static extern uint waveOutSetVolume(uint hwo, ulong dwVolume);
...
}
public class SetVolumeCls
{
...
public void GetWaveFormAudio()
{
uint DeviceID;
uint pVolume;
CoreLibVol.waveOutGetVolume(DeviceID, out pVolume);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
how can i get the DeviceID in my program?
Peter Foot said:You can either P/Invoke the waveOutSetVolume API method, or use the
ready-made OpenNETCF.Multimedia.Audio.Player class and it's Volume property
(www.opennetcf.org/sdf/)
Peter