![]() Result = SafeNativeMethods.waveOutUnprepareHeader (_hwo, waveHeader.WAVEHDR.ĪddrOfPinnedObject (), waveHeader.SizeHDR) WaveHeader waveHeader = item._waveHeader if the queue is empty, then restart the callers thread Uint vol = ((uint) volLeft & 0x0000ffff) | ((uint) volRight 0) Internal void SetVolume (ushort volLeft, ushort volRight) MMSYSERR result = SafeNativeMethods.waveOutGetVolume (_hwo, ref vol) Internal MMSYSERR GetVolume (ref ushort volLeft, ref ushort volRight) ![]() Will be thrown before the next write to the audio device Throw immediately if the queue is empty Override internal void InjectEvent (TTSEvent ttsEvent) / Wait for all the queued buffers to be played MMSYSERR result = SafeNativeMethods.waveOutRestart (_hwo) / Resume the playback of a paused sound. MMSYSERR result = SafeNativeMethods.waveOutPause (_hwo) Result = SafeNativeMethods.waveOutWrite (_hwo, waveHdr.AddrOfPinnedObject (), waveHeader.SizeHDR) Something in the queue cannot exit anymore MMSYSERR result = SafeNativeMethods.waveOutPrepareHeader (_hwo, waveHdr.AddrOfPinnedObject (), waveHeader.SizeHDR) WaveHeader waveHeader = new WaveHeader (buffer) Override internal void Play (byte buffer) Result = SafeNativeMethods.waveOutClose (_hwo) Close it no point in returning errors if this fails ![]() Reset the counter for the number of bytes written so far Result = SafeNativeMethods.waveOutPause (_hwo) If (_fPaused & result = MMSYSERR.NOERROR) Result = SafeNativeMethods.waveOutOpen (ref _hwo, _curDevice, wfx, _delegate, IntPtr.Zero, SafeNativeMethods.CALLBACK_FUNCTION) WAVEFORMATEX.AvgBytesPerSec (wfx, out _nAvgBytesPerSec, out _blockAlign) _delegate = new SafeNativeMethods.WaveOutProc (CallBackProc) Internal AudioDeviceOut (int curDevice, IAsyncDispatch asyncDispatch) / Create an instance of AudioDeviceOut. Internal class AudioDeviceOut : AudioBase, IDisposable ![]() / Encapsulates Waveform Audio Interface playback functions and provides a simple This class defines the header used to identify a waveform-audio If a custom audio device has been set via SetCustomAudioDevice, this will also trigger the following IAudioDevice methods in order: More./ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Speech / Src / Internal / Synthesis / AudioDeviceOut.cs / 1 / AudioDeviceOut.cs This method must be called whenever a change in output device happens in the custom audio device to let the SDK perform the necessary corrections for the new device. If a custom audio device has been set via SetCustomAudioDevice, this will also trigger the following IAudioDevice methods in order: More. This method must be called whenever a change in input device happens in the custom audio device to let the SDK perform the necessary corrections for the new device. Sets an instance of the IAudioDevice interface as the virtual audio device for a custom audio driver used by all publishers and subscribers. SetCustomAudioDevice ( Context context, IAudioDevice audioDevice) Gets the system default audio output device. Gets the system default audio input device. Sets the output audio device to be used by all subscribers. SetOutputAudioDevice ( OutputAudioDevice device) Sets the input audio device to be used by all subscribers. SetInputAudioDevice ( InputAudioDevice device) Returns a list of available audio output devices on the system. Returns a list of available audio input devices on the system. See EnumerateOutputAudioDevices and SetOutputAudioDevice. Represents an output audio device (such as headphones or speakers) available on the Windows system. This instance can be disposed when no longer used to release unmanaged resources. This object sends events when a system input or output audio device is added or removed, and when the default system input or output audio device changes. Represents a subscription to system audio device notifications. See EnumerateInputAudioDevices and SetInputAudioDevice. Represents an input audio device (such as a microphone) available on the Windows system. This class is used to both read and write audio samples in order for them to be rendered or sent to remote peers. A class that includes methods for setting the audio device to be used by publishers and subscribers.Īn audio bus used for all publisher and subscribers.
0 Comments
Leave a Reply. |