zenilib: zenilib/jni/external/openal-soft/Alc/backends/winmm.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Functions | Variables
winmm.c File Reference
`#include "config.h"`
`#include <stdlib.h>`
`#include <stdio.h>`
`#include <memory.h>`
`#include <windows.h>`
`#include <mmsystem.h>`
`#include "alMain.h"`
`#include "alu.h"`

Go to the source code of this file.

## Macros

#define | WAVE_FORMAT_IEEE_FLOAT 0x0003

## Functions

void | alcWinMMDeinit ()
ALCboolean | alcWinMMInit (BackendFuncs *FuncList)
void | alcWinMMProbe (enum DevProbe type)
static DWORD WINAPI | CaptureThreadProc (LPVOID param)
static DWORD WINAPI | PlaybackThreadProc (LPVOID param)
static void | ProbeCaptureDevices (void)
static void | ProbePlaybackDevices (void)
static void CALLBACK | WaveInProc (HWAVEIN device, UINT msg, DWORD_PTR instance, DWORD_PTR param1, DWORD_PTR param2)
static void CALLBACK | WaveOutProc (HWAVEOUT device, UINT msg, DWORD_PTR instance, DWORD_PTR param1, DWORD_PTR param2)
static ALCuint | WinMMAvailableSamples (ALCdevice *Device)
static ALCenum | WinMMCaptureSamples (ALCdevice *Device, ALCvoid *Buffer, ALCuint Samples)
static void | WinMMCloseCapture (ALCdevice *Device)
static void | WinMMClosePlayback (ALCdevice *device)
static ALCenum | WinMMOpenCapture (ALCdevice *Device, const ALCchar *deviceName)
static ALCenum | WinMMOpenPlayback (ALCdevice *Device, const ALCchar *deviceName)
static ALCboolean | WinMMResetPlayback (ALCdevice *device)
static void | WinMMStartCapture (ALCdevice *Device)
static ALCboolean | WinMMStartPlayback (ALCdevice *device)
static void | WinMMStopCapture (ALCdevice *Device)
static void | WinMMStopPlayback (ALCdevice *device)

## Variables

static ALCchar ** | CaptureDeviceList
static ALuint | NumCaptureDevices
static ALuint | NumPlaybackDevices
static ALCchar ** | PlaybackDeviceList
static const BackendFuncs | WinMMFuncs

## Macro Definition Documentation

#define WAVE_FORMAT_IEEE_FLOAT 0x0003

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

Definition at line 34 of file winmm.c.

Referenced by MakeExtensible(), WinMMOpenCapture(), WinMMOpenPlayback(), and WinMMResetPlayback().

## Function Documentation

void alcWinMMDeinit | ( | void |  | ) |

Definition at line 730 of file winmm.c.

References CaptureDeviceList, free, i, NULL, NumCaptureDevices, NumPlaybackDevices, and PlaybackDeviceList.

ALCboolean alcWinMMInit | ( | BackendFuncs * | FuncList | ) |

Definition at line 724 of file winmm.c.

References ALC_TRUE, and WinMMFuncs.

void alcWinMMProbe | ( | enum DevProbe | type | ) |

Definition at line 750 of file winmm.c.

References ALL_DEVICE_PROBE, AppendAllDevicesList(), AppendCaptureDeviceList(), CAPTURE_DEVICE_PROBE, CaptureDeviceList, i, NumCaptureDevices, NumPlaybackDevices, PlaybackDeviceList, ProbeCaptureDevices(), and ProbePlaybackDevices().

static DWORD WINAPI CaptureThreadProc | ( | LPVOID | param | ) |

static

Definition at line 237 of file winmm.c.

References ALCdevice_struct::ExtraData, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, FrameSizeFromDevFmt(), NULL, and WriteRingBuffer().

Referenced by WinMMOpenCapture().

static DWORD WINAPI PlaybackThreadProc | ( | LPVOID | param | ) |

static

Definition at line 170 of file winmm.c.

References aluMixData(), ALCdevice_struct::ExtraData, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, FrameSizeFromDevFmt(), NULL, and SetRTPriority().

Referenced by WinMMStartPlayback().

static void ProbeCaptureDevices | ( | void |  | ) |

static

Definition at line 103 of file winmm.c.

References CaptureDeviceList, free, i, j, NULL, NumCaptureDevices, realloc, and strdup().

Referenced by alcWinMMProbe(), and WinMMOpenCapture().

static void ProbePlaybackDevices | ( | void |  | ) |

static

Definition at line 64 of file winmm.c.

References free, i, j, NULL, NumPlaybackDevices, PlaybackDeviceList, realloc, and strdup().

Referenced by alcWinMMProbe(), and WinMMOpenPlayback().

static void CALLBACK WaveInProc | ( | HWAVEIN | device,
|  | UINT | msg,
|  | DWORD_PTR | instance,
|  | DWORD_PTR | param1,
|  | DWORD_PTR | param2
| ) |  |

static

Definition at line 216 of file winmm.c.

References ALCdevice_struct::ExtraData.

Referenced by WinMMOpenCapture().

static void CALLBACK WaveOutProc | ( | HWAVEOUT | device,
|  | UINT | msg,
|  | DWORD_PTR | instance,
|  | DWORD_PTR | param1,
|  | DWORD_PTR | param2
| ) |  |

static

Definition at line 149 of file winmm.c.

References ALCdevice_struct::ExtraData.

Referenced by WinMMOpenPlayback().

static ALCuint WinMMAvailableSamples | ( | ALCdevice * | Device | ) |

static

Definition at line 700 of file winmm.c.

References ALCdevice_struct::ExtraData, and RingBufferSize().

static ALCenum WinMMCaptureSamples | ( | ALCdevice * | Device,
|  | ALCvoid * | Buffer,
|  | ALCuint | Samples
| ) |  |

static

Definition at line 693 of file winmm.c.

References ALC_NO_ERROR, ALCdevice_struct::ExtraData, and ReadRingBuffer().

static void WinMMCloseCapture | ( | ALCdevice * | Device | ) |

static

Definition at line 640 of file winmm.c.

References AL_TRUE, DestroyRingBuffer(), ALCdevice_struct::ExtraData, FALSE, free, i, and NULL.

static void WinMMClosePlayback | ( | ALCdevice * | device | ) |

static

Definition at line 357 of file winmm.c.

References ALCdevice_struct::ExtraData, free, and NULL.

static ALCenum WinMMOpenCapture | ( | ALCdevice * | Device,
|  | const ALCchar * | deviceName
| ) |  |

static

Definition at line 489 of file winmm.c.

References ALC_INVALID_ENUM, ALC_INVALID_VALUE, ALC_NO_ERROR, ALC_OUT_OF_MEMORY, BytesFromDevFmt(), calloc, CaptureDeviceList, CaptureThreadProc(), ChannelsFromDevFmt(), CreateRingBuffer(), DestroyRingBuffer(), DevFmtByte, DevFmtFloat, DevFmtInt, DevFmtMono, DevFmtQuad, DevFmtShort, DevFmtStereo, DevFmtUByte, DevFmtUInt, DevFmtUShort, DevFmtX51, DevFmtX51Side, DevFmtX61, DevFmtX71, DWORD(), ERR, ALCdevice_struct::ExtraData, FALSE, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, free, ALCdevice_struct::Frequency, i, LPVOID(), memset, NULL, NumCaptureDevices, ProbeCaptureDevices(), strdup(), UINT(), WAVE_FORMAT_IEEE_FLOAT, WAVE_FORMAT_PCM, and WaveInProc().

static ALCenum WinMMOpenPlayback | ( | ALCdevice * | Device,
|  | const ALCchar * | deviceName
| ) |  |

static

Definition at line 273 of file winmm.c.

References ALC_INVALID_VALUE, ALC_NO_ERROR, ALC_OUT_OF_MEMORY, calloc, DevFmtByte, DevFmtFloat, DevFmtMono, DevFmtShort, DevFmtUByte, ERR, ALCdevice_struct::ExtraData, FALSE, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, free, ALCdevice_struct::Frequency, i, memset, NULL, NumPlaybackDevices, PlaybackDeviceList, ProbePlaybackDevices(), strdup(), UINT(), WAVE_FORMAT_IEEE_FLOAT, WAVE_FORMAT_PCM, and WaveOutProc().

static ALCboolean WinMMResetPlayback | ( | ALCdevice * | device | ) |

static

Definition at line 372 of file winmm.c.

References ALC_FALSE, ALC_TRUE, DevFmtFloat, DevFmtMono, DevFmtShort, DevFmtStereo, DevFmtUByte, ERR, ALCdevice_struct::ExtraData, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, ALCdevice_struct::Frequency, ALCdevice_struct::NumUpdates, SetDefaultWFXChannelOrder(), ALCdevice_struct::UpdateSize, WAVE_FORMAT_IEEE_FLOAT, and WAVE_FORMAT_PCM.

static void WinMMStartCapture | ( | ALCdevice * | Device | ) |

static

Definition at line 681 of file winmm.c.

References ALCdevice_struct::ExtraData.

static ALCboolean WinMMStartPlayback | ( | ALCdevice * | device | ) |

static

Definition at line 425 of file winmm.c.

References ALC_FALSE, ALC_TRUE, calloc, ALCdevice_struct::ExtraData, ALCdevice_struct::FmtChans, ALCdevice_struct::FmtType, FrameSizeFromDevFmt(), i, LPVOID(), memset, NULL, ALCdevice_struct::NumUpdates, PlaybackThreadProc(), and ALCdevice_struct::UpdateSize.

static void WinMMStopCapture | ( | ALCdevice * | Device | ) |

static

Definition at line 687 of file winmm.c.

References ALCdevice_struct::ExtraData.

static void WinMMStopPlayback | ( | ALCdevice * | device | ) |

static

Definition at line 458 of file winmm.c.

References AL_FALSE, AL_TRUE, ALCdevice_struct::ExtraData, FALSE, free, i, and NULL.

## Variable Documentation

ALCchar** CaptureDeviceList

static

Definition at line 60 of file winmm.c.

Referenced by alcWinMMDeinit(), alcWinMMProbe(), ProbeCaptureDevices(), and WinMMOpenCapture().

ALuint NumCaptureDevices

static

Definition at line 61 of file winmm.c.

Referenced by alcWinMMDeinit(), alcWinMMProbe(), ProbeCaptureDevices(), and WinMMOpenCapture().

ALuint NumPlaybackDevices

static

Definition at line 59 of file winmm.c.

Referenced by alcWinMMDeinit(), alcWinMMProbe(), ProbePlaybackDevices(), and WinMMOpenPlayback().

ALCchar** PlaybackDeviceList

static

Definition at line 58 of file winmm.c.

Referenced by alcWinMMDeinit(), alcWinMMProbe(), ProbePlaybackDevices(), and WinMMOpenPlayback().

const BackendFuncs WinMMFuncs

static

Initial value:
= {
WinMMOpenPlayback,
WinMMClosePlayback,
WinMMResetPlayback,
WinMMStartPlayback,
WinMMStopPlayback,
WinMMOpenCapture,
WinMMCloseCapture,
WinMMStartCapture,
WinMMStopCapture,
WinMMCaptureSamples,
WinMMAvailableSamples,
ALCdevice_LockDefault,
ALCdevice_UnlockDefault,
ALCdevice_GetLatencyDefault
}
WinMMStopCapture
static void WinMMStopCapture(ALCdevice *Device)
Definition: winmm.c:687
WinMMAvailableSamples
static ALCuint WinMMAvailableSamples(ALCdevice *Device)
Definition: winmm.c:700
WinMMOpenPlayback
static ALCenum WinMMOpenPlayback(ALCdevice *Device, const ALCchar *deviceName)
Definition: winmm.c:273
WinMMStopPlayback
static void WinMMStopPlayback(ALCdevice *device)
Definition: winmm.c:458
ALCdevice_GetLatencyDefault
ALint64 ALCdevice_GetLatencyDefault(ALCdevice *device)
Definition: ALc.c:1285
WinMMCloseCapture
static void WinMMCloseCapture(ALCdevice *Device)
Definition: winmm.c:640
WinMMResetPlayback
static ALCboolean WinMMResetPlayback(ALCdevice *device)
Definition: winmm.c:372
WinMMCaptureSamples
static ALCenum WinMMCaptureSamples(ALCdevice *Device, ALCvoid *Buffer, ALCuint Samples)
Definition: winmm.c:693
ALCdevice_LockDefault
void ALCdevice_LockDefault(ALCdevice *device)
Definition: ALc.c:1277
WinMMStartPlayback
static ALCboolean WinMMStartPlayback(ALCdevice *device)
Definition: winmm.c:425
WinMMStartCapture
static void WinMMStartCapture(ALCdevice *Device)
Definition: winmm.c:681
WinMMClosePlayback
static void WinMMClosePlayback(ALCdevice *device)
Definition: winmm.c:357
ALCdevice_UnlockDefault
void ALCdevice_UnlockDefault(ALCdevice *device)
Definition: ALc.c:1281
WinMMOpenCapture
static ALCenum WinMMOpenCapture(ALCdevice *Device, const ALCchar *deviceName)
Definition: winmm.c:489

Definition at line 707 of file winmm.c.

Referenced by alcWinMMInit().