mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
54 lines
1.8 KiB
C#
54 lines
1.8 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using NAudio.Wave;
|
|
|
|
namespace NAudio.CoreAudioApi.Interfaces
|
|
{
|
|
/// <summary>
|
|
/// n.b. WORK IN PROGRESS - this code will probably do nothing but crash at the moment
|
|
/// Defined in AudioClient.h
|
|
/// </summary>
|
|
[Guid("1CB9AD4C-DBFA-4c32-B178-C2F568A703B2"),
|
|
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
|
internal interface IAudioClient
|
|
{
|
|
void Initialize(AudioClientShareMode shareMode,
|
|
AudioClientStreamFlags StreamFlags,
|
|
long hnsBufferDuration, // REFERENCE_TIME
|
|
long hnsPeriodicity, // REFERENCE_TIME
|
|
[In] WaveFormat pFormat,
|
|
[In] ref Guid AudioSessionGuid);
|
|
|
|
/// <summary>
|
|
/// The GetBufferSize method retrieves the size (maximum capacity) of the endpoint buffer.
|
|
/// </summary>
|
|
void GetBufferSize(out uint bufferSize);
|
|
|
|
[return: MarshalAs(UnmanagedType.I8)]
|
|
long GetStreamLatency();
|
|
|
|
void GetCurrentPadding(out int currentPadding);
|
|
|
|
[PreserveSig]
|
|
int IsFormatSupported(
|
|
AudioClientShareMode shareMode,
|
|
[In] WaveFormat pFormat,
|
|
[Out, MarshalAs(UnmanagedType.LPStruct)] out WaveFormatExtensible closestMatchFormat);
|
|
|
|
void GetMixFormat(out IntPtr deviceFormatPointer);
|
|
|
|
// REFERENCE_TIME is 64 bit int
|
|
void GetDevicePeriod(out long defaultDevicePeriod, out long minimumDevicePeriod);
|
|
|
|
void Start();
|
|
|
|
void Stop();
|
|
|
|
void Reset();
|
|
|
|
void SetEventHandle(IntPtr eventHandle);
|
|
|
|
void GetService(ref Guid interfaceId, [MarshalAs(UnmanagedType.IUnknown)] out object interfacePointer);
|
|
}
|
|
}
|