public class WASAPI
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
AUDCLNT_E_NOT_STOPPED |
static int |
AUDCLNT_SHAREMODE_SHARED |
static int |
AUDCLNT_STREAMFLAGS_EVENTCALLBACK |
static int |
AUDCLNT_STREAMFLAGS_LOOPBACK |
static int |
AUDCLNT_STREAMFLAGS_NOPERSIST |
static int |
CLSCTX_ALL |
static java.lang.String |
CLSID_MMDeviceEnumerator |
static int |
COINIT_MULTITHREADED |
static int |
DEVICE_STATE_ACTIVE |
static int |
eAll |
static int |
eCapture |
static int |
eRender |
static java.lang.String |
IID_IAudioCaptureClient |
static java.lang.String |
IID_IAudioClient |
static java.lang.String |
IID_IAudioRenderClient |
static java.lang.String |
IID_IMMDeviceEnumerator |
static java.lang.String |
IID_IMMEndpoint |
static long |
PKEY_Device_FriendlyName |
static int |
RPC_E_CHANGED_MODE |
static int |
S_FALSE |
static int |
S_OK |
static int |
STGM_READ |
static int |
WAIT_ABANDONED
The return value of
WaitForSingleObject(long, long) which
indicates that the specified object is a mutex that was not released by
the thread that owned the mutex before the owning thread terminated. |
static int |
WAIT_FAILED
The return value of
WaitForSingleObject(long, long) which
indicates that the function has failed. |
static int |
WAIT_OBJECT_0
The return value of
WaitForSingleObject(long, long) which
indicates that the specified object is signaled. |
static int |
WAIT_TIMEOUT
The return value of
WaitForSingleObject(long, long) which
indicates that the specified time-out interval has elapsed and the state
of the specified object is non-signaled. |
static char |
WAVE_FORMAT_PCM |
Modifier and Type | Method and Description |
---|---|
static void |
CloseHandle(long hObject) |
static java.lang.String |
CoCreateGuid() |
static long |
CoCreateInstance(java.lang.String clsid,
long pUnkOuter,
int dwClsContext,
java.lang.String iid) |
static int |
CoInitializeEx(long pvReserved,
int dwCoInit) |
static void |
CoTaskMemFree(long pv) |
static void |
CoUninitialize() |
static long |
CreateEvent(long lpEventAttributes,
boolean bManualReset,
boolean bInitialState,
java.lang.String lpName) |
static boolean |
FAILED(int hresult)
Determines whether a specific HRESULT value indicates failure.
|
static int |
IAudioCaptureClient_GetNextPacketSize(long thiz) |
static int |
IAudioCaptureClient_Read(long thiz,
byte[] data,
int offset,
int length,
int srcSampleSize,
int srcChannels,
int dstSampleSize,
int dstChannels) |
static void |
IAudioCaptureClient_Release(long thiz) |
static int |
IAudioClient_GetBufferSize(long thiz) |
static int |
IAudioClient_GetCurrentPadding(long thiz) |
static long |
IAudioClient_GetDefaultDevicePeriod(long thiz) |
static long |
IAudioClient_GetMinimumDevicePeriod(long thiz) |
static long |
IAudioClient_GetService(long thiz,
java.lang.String iid) |
static int |
IAudioClient_Initialize(long thiz,
int shareMode,
int streamFlags,
long hnsBufferDuration,
long hnsPeriodicity,
long pFormat,
java.lang.String audioSessionGuid) |
static long |
IAudioClient_IsFormatSupported(long thiz,
int shareMode,
long pFormat) |
static void |
IAudioClient_Release(long thiz) |
static void |
IAudioClient_SetEventHandle(long thiz,
long eventHandle) |
static int |
IAudioClient_Start(long thiz) |
static int |
IAudioClient_Stop(long thiz) |
static void |
IAudioRenderClient_Release(long thiz) |
static int |
IAudioRenderClient_Write(long thiz,
byte[] data,
int offset,
int length,
int srcSampleSize,
int srcChannels,
int dstSampleSize,
int dstChannels)
Writes specific audio data into the rendering endpoint buffer of a
specific IAudioRenderClient.
|
static long |
IMMDevice_Activate(long thiz,
java.lang.String iid,
int dwClsCtx,
long pActivationParams) |
static java.lang.String |
IMMDevice_GetId(long thiz) |
static int |
IMMDevice_GetState(long thiz) |
static long |
IMMDevice_OpenPropertyStore(long thiz,
int stgmAccess) |
static long |
IMMDevice_QueryInterface(long thiz,
java.lang.String iid) |
static void |
IMMDevice_Release(long thiz) |
static int |
IMMDeviceCollection_GetCount(long thiz) |
static long |
IMMDeviceCollection_Item(long thiz,
int nDevice) |
static void |
IMMDeviceCollection_Release(long thiz) |
static long |
IMMDeviceEnumerator_EnumAudioEndpoints(long thiz,
int dataFlow,
int dwStateMask) |
static long |
IMMDeviceEnumerator_GetDevice(long thiz,
java.lang.String pwstrId) |
static void |
IMMDeviceEnumerator_Release(long thiz) |
static int |
IMMEndpoint_GetDataFlow(long thiz) |
static void |
IMMEndpoint_Release(long thiz) |
static java.lang.String |
IPropertyStore_GetString(long thiz,
long key) |
static void |
IPropertyStore_Release(long thiz) |
static long |
PSPropertyKeyFromString(java.lang.String pszString) |
static void |
ResetEvent(long hEvent) |
static boolean |
SUCCEEDED(int hresult)
Determines whether a specific HRESULT value indicates success.
|
static int |
WaitForSingleObject(long hHandle,
long dwMilliseconds)
Waits until the specified object is in the signaled state or the
specified time-out interval elapses.
|
static long |
WAVEFORMATEX_alloc() |
static void |
WAVEFORMATEX_fill(long thiz,
char wFormatTag,
char nChannels,
int nSamplesPerSec,
int nAvgBytesPerSec,
char nBlockAlign,
char wBitsPerSample,
char cbSize) |
static char |
WAVEFORMATEX_getCbSize(long thiz) |
static int |
WAVEFORMATEX_getNAvgBytesPerSec(long thiz) |
static char |
WAVEFORMATEX_getNBlockAlign(long thiz) |
static char |
WAVEFORMATEX_getNChannels(long thiz) |
static int |
WAVEFORMATEX_getNSamplesPerSec(long thiz) |
static char |
WAVEFORMATEX_getWBitsPerSample(long thiz) |
static char |
WAVEFORMATEX_getWFormatTag(long thiz) |
static void |
WAVEFORMATEX_setCbSize(long thiz,
char cbSize) |
static void |
WAVEFORMATEX_setNAvgBytesPerSec(long thiz,
int nAvgBytesPerSec) |
static void |
WAVEFORMATEX_setNBlockAlign(long thiz,
char nBlockAlign) |
static void |
WAVEFORMATEX_setNChannels(long thiz,
char nChannels) |
static void |
WAVEFORMATEX_setNSamplesPerSec(long thiz,
int nSamplesPerSec) |
static void |
WAVEFORMATEX_setWBitsPerSample(long thiz,
char wBitsPerSample) |
static void |
WAVEFORMATEX_setWFormatTag(long thiz,
char wFormatTag) |
static int |
WAVEFORMATEX_sizeof() |
public static final int AUDCLNT_E_NOT_STOPPED
public static final int AUDCLNT_SHAREMODE_SHARED
public static final int AUDCLNT_STREAMFLAGS_EVENTCALLBACK
public static final int AUDCLNT_STREAMFLAGS_LOOPBACK
public static final int AUDCLNT_STREAMFLAGS_NOPERSIST
public static final int CLSCTX_ALL
public static final java.lang.String CLSID_MMDeviceEnumerator
public static final int COINIT_MULTITHREADED
public static final int DEVICE_STATE_ACTIVE
public static final int eAll
public static final int eCapture
public static final int eRender
public static final java.lang.String IID_IAudioCaptureClient
public static final java.lang.String IID_IAudioClient
public static final java.lang.String IID_IAudioRenderClient
public static final java.lang.String IID_IMMDeviceEnumerator
public static final java.lang.String IID_IMMEndpoint
public static final long PKEY_Device_FriendlyName
public static final int RPC_E_CHANGED_MODE
public static final int S_FALSE
public static final int S_OK
public static final int STGM_READ
public static final int WAIT_ABANDONED
WaitForSingleObject(long, long)
which
indicates that the specified object is a mutex that was not released by
the thread that owned the mutex before the owning thread terminated.
Ownership of the mutex is granted to the calling thread and the mutex
state is set to non-signaled.public static final int WAIT_FAILED
WaitForSingleObject(long, long)
which
indicates that the function has failed. Normally, the function will throw
an HResultException
in the case and
HResultException.getHResult()
will return WAIT_FAILED.public static final int WAIT_OBJECT_0
WaitForSingleObject(long, long)
which
indicates that the specified object is signaled.public static final int WAIT_TIMEOUT
WaitForSingleObject(long, long)
which
indicates that the specified time-out interval has elapsed and the state
of the specified object is non-signaled.public static final char WAVE_FORMAT_PCM
public static void CloseHandle(long hObject) throws HResultException
HResultException
public static java.lang.String CoCreateGuid() throws HResultException
HResultException
public static long CoCreateInstance(java.lang.String clsid, long pUnkOuter, int dwClsContext, java.lang.String iid) throws HResultException
HResultException
public static int CoInitializeEx(long pvReserved, int dwCoInit) throws HResultException
HResultException
public static void CoTaskMemFree(long pv)
public static void CoUninitialize()
public static long CreateEvent(long lpEventAttributes, boolean bManualReset, boolean bInitialState, java.lang.String lpName) throws HResultException
HResultException
public static boolean FAILED(int hresult)
hresult
- the HRESULT value to be checked whether it
indicates failurepublic static int IAudioCaptureClient_GetNextPacketSize(long thiz) throws HResultException
HResultException
public static int IAudioCaptureClient_Read(long thiz, byte[] data, int offset, int length, int srcSampleSize, int srcChannels, int dstSampleSize, int dstChannels) throws HResultException
HResultException
public static void IAudioCaptureClient_Release(long thiz)
public static int IAudioClient_GetBufferSize(long thiz) throws HResultException
HResultException
public static int IAudioClient_GetCurrentPadding(long thiz) throws HResultException
HResultException
public static long IAudioClient_GetDefaultDevicePeriod(long thiz) throws HResultException
HResultException
public static long IAudioClient_GetMinimumDevicePeriod(long thiz) throws HResultException
HResultException
public static long IAudioClient_GetService(long thiz, java.lang.String iid) throws HResultException
HResultException
public static int IAudioClient_Initialize(long thiz, int shareMode, int streamFlags, long hnsBufferDuration, long hnsPeriodicity, long pFormat, java.lang.String audioSessionGuid) throws HResultException
HResultException
public static long IAudioClient_IsFormatSupported(long thiz, int shareMode, long pFormat) throws HResultException
HResultException
public static void IAudioClient_Release(long thiz)
public static void IAudioClient_SetEventHandle(long thiz, long eventHandle) throws HResultException
HResultException
public static int IAudioClient_Start(long thiz) throws HResultException
HResultException
public static int IAudioClient_Stop(long thiz) throws HResultException
HResultException
public static void IAudioRenderClient_Release(long thiz)
public static int IAudioRenderClient_Write(long thiz, byte[] data, int offset, int length, int srcSampleSize, int srcChannels, int dstSampleSize, int dstChannels) throws HResultException
thiz
- the IAudioRenderClient which abstracts the rendering
endpoint buffer into which the specified audio data is to be
writtendata
- the bytes of the audio samples to be written into the
specified rendering endpoint bufferoffset
- the offset in bytes within data at which valid
audio samples beginlength
- the number of bytes of valid audio samples in datasrcSampleSize
- the size in bytes of an audio sample in
datasrcChannels
- the number of channels of the audio signal provided
in datadstSampleSize
- the size in bytes of an audio sample in the
rendering endpoint bufferdstChannels
- the number of channels with which the rendering
endpoint buffer has been initializedHResultException
- if an HRESULT value indicating an error is
returned by a function invoked by the method implementation or an I/O
error is encountered during the execution of the methodpublic static long IMMDevice_Activate(long thiz, java.lang.String iid, int dwClsCtx, long pActivationParams) throws HResultException
HResultException
public static java.lang.String IMMDevice_GetId(long thiz) throws HResultException
HResultException
public static int IMMDevice_GetState(long thiz) throws HResultException
HResultException
public static long IMMDevice_OpenPropertyStore(long thiz, int stgmAccess) throws HResultException
HResultException
public static long IMMDevice_QueryInterface(long thiz, java.lang.String iid) throws HResultException
HResultException
public static void IMMDevice_Release(long thiz)
public static int IMMDeviceCollection_GetCount(long thiz) throws HResultException
HResultException
public static long IMMDeviceCollection_Item(long thiz, int nDevice) throws HResultException
HResultException
public static void IMMDeviceCollection_Release(long thiz)
public static long IMMDeviceEnumerator_EnumAudioEndpoints(long thiz, int dataFlow, int dwStateMask) throws HResultException
HResultException
public static long IMMDeviceEnumerator_GetDevice(long thiz, java.lang.String pwstrId) throws HResultException
HResultException
public static void IMMDeviceEnumerator_Release(long thiz)
public static int IMMEndpoint_GetDataFlow(long thiz) throws HResultException
HResultException
public static void IMMEndpoint_Release(long thiz)
public static java.lang.String IPropertyStore_GetString(long thiz, long key) throws HResultException
HResultException
public static void IPropertyStore_Release(long thiz)
public static long PSPropertyKeyFromString(java.lang.String pszString) throws HResultException
HResultException
public static void ResetEvent(long hEvent) throws HResultException
HResultException
public static boolean SUCCEEDED(int hresult)
hresult
- the HRESULT value to be checked whether it
indicates successpublic static int WaitForSingleObject(long hHandle, long dwMilliseconds) throws HResultException
hHandle
- a HANDLE to the object to wait fordwMilliseconds
- the time-out interval in milliseconds to wait. If a
nonzero value is specified, the function waits until the specified object
is signaled or the specified time-out interval elapses. If
dwMilliseconds is zero, the function does not enter a wait state
if the specified object is not signaled; it always returns immediately.
If dwMilliseconds is INFINITE, the function will return
only when the specified object is signaled.HResultException
- if the return value is WAIT_FAILED
public static long WAVEFORMATEX_alloc()
public static void WAVEFORMATEX_fill(long thiz, char wFormatTag, char nChannels, int nSamplesPerSec, int nAvgBytesPerSec, char nBlockAlign, char wBitsPerSample, char cbSize)
public static char WAVEFORMATEX_getCbSize(long thiz)
public static int WAVEFORMATEX_getNAvgBytesPerSec(long thiz)
public static char WAVEFORMATEX_getNBlockAlign(long thiz)
public static char WAVEFORMATEX_getNChannels(long thiz)
public static int WAVEFORMATEX_getNSamplesPerSec(long thiz)
public static char WAVEFORMATEX_getWBitsPerSample(long thiz)
public static char WAVEFORMATEX_getWFormatTag(long thiz)
public static void WAVEFORMATEX_setCbSize(long thiz, char cbSize)
public static void WAVEFORMATEX_setNAvgBytesPerSec(long thiz, int nAvgBytesPerSec)
public static void WAVEFORMATEX_setNBlockAlign(long thiz, char nBlockAlign)
public static void WAVEFORMATEX_setNChannels(long thiz, char nChannels)
public static void WAVEFORMATEX_setNSamplesPerSec(long thiz, int nSamplesPerSec)
public static void WAVEFORMATEX_setWBitsPerSample(long thiz, char wBitsPerSample)
public static void WAVEFORMATEX_setWFormatTag(long thiz, char wFormatTag)
public static int WAVEFORMATEX_sizeof()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.