zenilib
0.5.3.0
|
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <memory.h>
#include <dsound.h>
#include <cguid.h>
#include <mmreg.h>
#include <ks.h>
#include <ksmedia.h>
#include "alMain.h"
#include "alu.h"
Go to the source code of this file.
Macros | |
#define | DirectSoundCaptureCreate pDirectSoundCaptureCreate |
#define | DirectSoundCaptureEnumerateA pDirectSoundCaptureEnumerateA |
#define | DirectSoundCreate pDirectSoundCreate |
#define | DirectSoundEnumerateA pDirectSoundEnumerateA |
#define | LOAD_FUNC(f) |
#define | MAX_UPDATES 128 |
Functions | |
void | alcDSoundDeinit (void) |
ALCboolean | alcDSoundInit (BackendFuncs *FuncList) |
void | alcDSoundProbe (enum DevProbe type) |
DEFINE_GUID (KSDATAFORMAT_SUBTYPE_PCM, 0x00000001, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) | |
DEFINE_GUID (KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, 0x00000003, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) | |
static ALCuint | DSoundAvailableSamples (ALCdevice *Device) |
static ALCenum | DSoundCaptureSamples (ALCdevice *Device, ALCvoid *pBuffer, ALCuint lSamples) |
static void | DSoundCloseCapture (ALCdevice *device) |
static void | DSoundClosePlayback (ALCdevice *device) |
static BOOL CALLBACK | DSoundEnumCaptureDevices (LPGUID guid, LPCSTR desc, LPCSTR drvname, LPVOID data) |
static BOOL CALLBACK | DSoundEnumPlaybackDevices (LPGUID guid, LPCSTR desc, LPCSTR drvname, LPVOID data) |
static ALCboolean | DSoundLoad (void) |
static ALCenum | DSoundOpenCapture (ALCdevice *device, const ALCchar *deviceName) |
static ALCenum | DSoundOpenPlayback (ALCdevice *device, const ALCchar *deviceName) |
static ALuint | DSoundPlaybackProc (ALvoid *ptr) |
static ALCboolean | DSoundResetPlayback (ALCdevice *device) |
static void | DSoundStartCapture (ALCdevice *device) |
static ALCboolean | DSoundStartPlayback (ALCdevice *device) |
static void | DSoundStopCapture (ALCdevice *device) |
static void | DSoundStopPlayback (ALCdevice *device) |
static | HRESULT (WINAPI *pDirectSoundCreate)(LPCGUID pcGuidDevice |
Variables | |
static DevMap * | CaptureDeviceList |
static void * | ds_handle |
static const BackendFuncs | DSoundFuncs |
static ALuint | NumCaptureDevices |
static ALuint | NumPlaybackDevices |
static void * | pContext |
static DevMap * | PlaybackDeviceList |
static IDirectSound ** | ppDS |
static IDirectSoundCapture ** | ppDSC |
static IDirectSound IUnknown * | pUnkOuter |
#define DirectSoundCaptureCreate pDirectSoundCaptureCreate |
Definition at line 57 of file dsound.c.
Referenced by DSoundLoad(), and DSoundOpenCapture().
#define DirectSoundCaptureEnumerateA pDirectSoundCaptureEnumerateA |
Definition at line 58 of file dsound.c.
Referenced by alcDSoundProbe(), DSoundLoad(), and DSoundOpenCapture().
#define DirectSoundCreate pDirectSoundCreate |
Definition at line 55 of file dsound.c.
Referenced by DSoundLoad(), and DSoundOpenPlayback().
#define DirectSoundEnumerateA pDirectSoundEnumerateA |
Definition at line 56 of file dsound.c.
Referenced by alcDSoundProbe(), DSoundLoad(), and DSoundOpenPlayback().
#define LOAD_FUNC | ( | f | ) |
Referenced by alsa_load(), DSoundLoad(), and pa_load().
#define MAX_UPDATES 128 |
Definition at line 93 of file dsound.c.
Referenced by DSoundResetPlayback().
Definition at line 969 of file dsound.c.
References CaptureDeviceList, ds_handle, free, i, NULL, NumCaptureDevices, NumPlaybackDevices, and PlaybackDeviceList.
ALCboolean alcDSoundInit | ( | BackendFuncs * | FuncList | ) |
Definition at line 961 of file dsound.c.
References ALC_FALSE, ALC_TRUE, DSoundFuncs, and DSoundLoad().
Definition at line 990 of file dsound.c.
References ALL_DEVICE_PROBE, AppendAllDevicesList(), AppendCaptureDeviceList(), CAPTURE_DEVICE_PROBE, CaptureDeviceList, DirectSoundCaptureEnumerateA, DirectSoundEnumerateA, DSoundEnumCaptureDevices(), DSoundEnumPlaybackDevices(), ERR, free, HRESULT(), i, NULL, NumCaptureDevices, NumPlaybackDevices, and PlaybackDeviceList.
DEFINE_GUID | ( | KSDATAFORMAT_SUBTYPE_PCM | , |
0x00000001 | , | ||
0x0000 | , | ||
0x0010 | , | ||
0x80 | , | ||
0x00 | , | ||
0x00 | , | ||
0xaa | , | ||
0x00 | , | ||
0x38 | , | ||
0x9b | , | ||
0x71 | |||
) |
OpenAL cross platform audio library Copyright (C) 1999-2007 by authors. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Or go to http://www.gnu.org/copyleft/lgpl.html
DEFINE_GUID | ( | KSDATAFORMAT_SUBTYPE_IEEE_FLOAT | , |
0x00000003 | , | ||
0x0000 | , | ||
0x0010 | , | ||
0x80 | , | ||
0x00 | , | ||
0x00 | , | ||
0xaa | , | ||
0x00 | , | ||
0x38 | , | ||
0x9b | , | ||
0x71 | |||
) |
Definition at line 895 of file dsound.c.
References aluHandleDisconnect(), ALCdevice_struct::Connected, DWORD(), ERR, ALCdevice_struct::ExtraData, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, FrameSizeFromDevFmt(), HRESULT(), NULL, RingBufferSize(), VOID(), and WriteRingBuffer().
|
static |
Definition at line 888 of file dsound.c.
References ALC_NO_ERROR, ALCdevice_struct::ExtraData, and ReadRingBuffer().
Definition at line 841 of file dsound.c.
References DestroyRingBuffer(), ALCdevice_struct::ExtraData, free, and NULL.
Definition at line 396 of file dsound.c.
References ALCdevice_struct::ExtraData, free, and NULL.
|
static |
Definition at line 174 of file dsound.c.
References CaptureDeviceList, HRESULT(), i, NULL, NumCaptureDevices, realloc, str, strdup(), TRACE, and TRUE.
Referenced by alcDSoundProbe(), and DSoundOpenCapture().
|
static |
Definition at line 124 of file dsound.c.
References HRESULT(), i, NULL, NumPlaybackDevices, PlaybackDeviceList, realloc, str, strdup(), TRACE, and TRUE.
Referenced by alcDSoundProbe(), and DSoundOpenPlayback().
|
static |
Definition at line 95 of file dsound.c.
References ALC_FALSE, ALC_TRUE, DirectSoundCaptureCreate, DirectSoundCaptureEnumerateA, DirectSoundCreate, DirectSoundEnumerateA, ds_handle, ERR, LOAD_FUNC, and NULL.
Referenced by alcDSoundInit().
Definition at line 656 of file dsound.c.
References ALC_INVALID_ENUM, ALC_INVALID_VALUE, ALC_NO_ERROR, ALC_OUT_OF_MEMORY, BytesFromDevFmt(), calloc, CaptureDeviceList, tWAVEFORMATEX::cbSize, ChannelsFromDevFmt(), CreateRingBuffer(), DestroyRingBuffer(), DevFmtByte, DevFmtFloat, DevFmtInt, DevFmtMono, DevFmtQuad, DevFmtShort, DevFmtStereo, DevFmtTypeString(), DevFmtUByte, DevFmtUInt, DevFmtUShort, DevFmtX51, DevFmtX51Side, DevFmtX61, DevFmtX71, ALCdevice_struct::DeviceName, DirectSoundCaptureCreate, DirectSoundCaptureEnumerateA, DSoundEnumCaptureDevices(), WAVEFORMATEXTENSIBLE::dwChannelMask, ERR, ALCdevice_struct::ExtraData, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, WAVEFORMATEXTENSIBLE::Format, free, ALCdevice_struct::Frequency, HRESULT(), i, maxu(), memset, tWAVEFORMATEX::nAvgBytesPerSec, tWAVEFORMATEX::nBlockAlign, tWAVEFORMATEX::nChannels, tWAVEFORMATEX::nSamplesPerSec, NULL, NumCaptureDevices, ALCdevice_struct::NumUpdates, WAVEFORMATEXTENSIBLE::Samples, SetDefaultWFXChannelOrder(), SPEAKER_BACK_CENTER, SPEAKER_BACK_LEFT, SPEAKER_BACK_RIGHT, SPEAKER_FRONT_CENTER, SPEAKER_FRONT_LEFT, SPEAKER_FRONT_RIGHT, SPEAKER_LOW_FREQUENCY, SPEAKER_SIDE_LEFT, SPEAKER_SIDE_RIGHT, strdup(), WAVEFORMATEXTENSIBLE::SubFormat, ALCdevice_struct::UpdateSize, WARN, WAVE_FORMAT_EXTENSIBLE, WAVE_FORMAT_PCM, tWAVEFORMATEX::wBitsPerSample, tWAVEFORMATEX::wFormatTag, and WAVEFORMATEXTENSIBLE::wValidBitsPerSample.
Definition at line 331 of file dsound.c.
References ALC_INVALID_VALUE, ALC_NO_ERROR, ALC_OUT_OF_MEMORY, calloc, ALCdevice_struct::DeviceName, DirectSoundCreate, DirectSoundEnumerateA, DSoundEnumPlaybackDevices(), ERR, ALCdevice_struct::ExtraData, FALSE, free, HRESULT(), i, NULL, NumPlaybackDevices, PlaybackDeviceList, and strdup().
Definition at line 224 of file dsound.c.
References ALCdevice_Lock, ALCdevice_Unlock, aluHandleDisconnect(), aluMixData(), BOOL(), DWORD(), ERR, ALCdevice_struct::ExtraData, FALSE, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, FrameSizeFromDevFmt(), HRESULT(), memset, NULL, SetRTPriority(), TRUE, ALCdevice_struct::UpdateSize, VOID(), and WARN.
Referenced by DSoundStartPlayback().
|
static |
Definition at line 416 of file dsound.c.
References ALC_FALSE, ALC_TRUE, BytesFromDevFmt(), ChannelsFromDevFmt(), DevFmtByte, DevFmtFloat, DevFmtInt, DevFmtMono, DevFmtQuad, DevFmtShort, DevFmtStereo, DevFmtUByte, DevFmtUInt, DevFmtUShort, DevFmtX51, DevFmtX51Side, DevFmtX61, DevFmtX71, DEVICE_CHANNELS_REQUEST, DEVICE_SAMPLE_TYPE_REQUEST, DWORD(), ERR, ALCdevice_struct::ExtraData, ALCdevice_struct::Flags, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, ALCdevice_struct::Frequency, HRESULT(), i, LPVOID(), MAX_UPDATES, memset, NULL, ALCdevice_struct::NumUpdates, SetDefaultWFXChannelOrder(), SPEAKER_BACK_CENTER, SPEAKER_BACK_LEFT, SPEAKER_BACK_RIGHT, SPEAKER_FRONT_CENTER, SPEAKER_FRONT_LEFT, SPEAKER_FRONT_RIGHT, SPEAKER_LOW_FREQUENCY, SPEAKER_SIDE_LEFT, SPEAKER_SIDE_RIGHT, ALCdevice_struct::UpdateSize, WAVE_FORMAT_EXTENSIBLE, and WAVE_FORMAT_PCM.
Definition at line 862 of file dsound.c.
References aluHandleDisconnect(), ERR, ALCdevice_struct::ExtraData, and HRESULT().
|
static |
Definition at line 629 of file dsound.c.
References ALC_FALSE, ALC_TRUE, DSoundPlaybackProc(), ALCdevice_struct::ExtraData, NULL, and StartThread().
Definition at line 875 of file dsound.c.
References aluHandleDisconnect(), ERR, ALCdevice_struct::ExtraData, and HRESULT().
Definition at line 640 of file dsound.c.
References ALCdevice_struct::ExtraData, NULL, and StopThread().
|
static |
|
static |
Definition at line 90 of file dsound.c.
Referenced by alcDSoundDeinit(), alcDSoundProbe(), DSoundEnumCaptureDevices(), and DSoundOpenCapture().
|
static |
Definition at line 49 of file dsound.c.
Referenced by alcDSoundDeinit(), and DSoundLoad().
|
static |
Definition at line 943 of file dsound.c.
Referenced by alcDSoundInit().
|
static |
Definition at line 91 of file dsound.c.
Referenced by alcDSoundDeinit(), alcDSoundProbe(), DSoundEnumCaptureDevices(), and DSoundOpenCapture().
|
static |
Definition at line 89 of file dsound.c.
Referenced by alcDSoundDeinit(), alcDSoundProbe(), DSoundEnumPlaybackDevices(), and DSoundOpenPlayback().
|
static |
Definition at line 88 of file dsound.c.
Referenced by alcDSoundDeinit(), alcDSoundProbe(), DSoundEnumPlaybackDevices(), and DSoundOpenPlayback().