Blame channels/tsmf/client/tsmf_audio.h

Packit 1fb8d4
/**
Packit 1fb8d4
 * FreeRDP: A Remote Desktop Protocol Implementation
Packit 1fb8d4
 * Video Redirection Virtual Channel - Audio Device Manager
Packit 1fb8d4
 *
Packit 1fb8d4
 * Copyright 2010-2011 Vic Lee
Packit 1fb8d4
 *
Packit 1fb8d4
 * Licensed under the Apache License, Version 2.0 (the "License");
Packit 1fb8d4
 * you may not use this file except in compliance with the License.
Packit 1fb8d4
 * You may obtain a copy of the License at
Packit 1fb8d4
 *
Packit 1fb8d4
 *     http://www.apache.org/licenses/LICENSE-2.0
Packit 1fb8d4
 *
Packit 1fb8d4
 * Unless required by applicable law or agreed to in writing, software
Packit 1fb8d4
 * distributed under the License is distributed on an "AS IS" BASIS,
Packit 1fb8d4
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Packit 1fb8d4
 * See the License for the specific language governing permissions and
Packit 1fb8d4
 * limitations under the License.
Packit 1fb8d4
 */
Packit 1fb8d4
Packit 1fb8d4
#ifndef FREERDP_CHANNEL_TSMF_CLIENT_AUDIO_H
Packit 1fb8d4
#define FREERDP_CHANNEL_TSMF_CLIENT_AUDIO_H
Packit 1fb8d4
Packit 1fb8d4
#include "tsmf_types.h"
Packit 1fb8d4
Packit 1fb8d4
typedef struct _ITSMFAudioDevice ITSMFAudioDevice;
Packit 1fb8d4
Packit 1fb8d4
struct _ITSMFAudioDevice
Packit 1fb8d4
{
Packit 1fb8d4
	/* Open the audio device. */
Packit 1fb8d4
	BOOL (*Open)(ITSMFAudioDevice* audio, const char* device);
Packit 1fb8d4
	/* Set the audio data format. */
Packit 1fb8d4
	BOOL (*SetFormat)(ITSMFAudioDevice* audio, UINT32 sample_rate, UINT32 channels,
Packit 1fb8d4
	                  UINT32 bits_per_sample);
Packit 1fb8d4
	/* Play audio data. */
Packit 1fb8d4
	BOOL (*Play)(ITSMFAudioDevice* audio, const BYTE* data, UINT32 data_size);
Packit 1fb8d4
	/* Get the latency of the last written sample, in 100ns */
Packit 1fb8d4
	UINT64(*GetLatency)(ITSMFAudioDevice* audio);
Packit 1fb8d4
	/* Change the playback volume level */
Packit 1fb8d4
	BOOL (*ChangeVolume)(ITSMFAudioDevice* audio, UINT32 newVolume, UINT32 muted);
Packit 1fb8d4
	/* Flush queued audio data */
Packit 1fb8d4
	BOOL (*Flush)(ITSMFAudioDevice* audio);
Packit 1fb8d4
	/* Free the audio device */
Packit 1fb8d4
	void (*Free)(ITSMFAudioDevice* audio);
Packit 1fb8d4
};
Packit 1fb8d4
Packit 1fb8d4
#define TSMF_AUDIO_DEVICE_EXPORT_FUNC_NAME "TSMFAudioDeviceEntry"
Packit 1fb8d4
typedef ITSMFAudioDevice* (*TSMF_AUDIO_DEVICE_ENTRY)(void);
Packit 1fb8d4
Packit 1fb8d4
ITSMFAudioDevice* tsmf_load_audio_device(const char* name, const char* device);
Packit 1fb8d4
Packit 1fb8d4
#endif /* FREERDP_CHANNEL_TSMF_CLIENT_AUDIO_H */