2011-09-19 18:54:09 +04:00
|
|
|
/**
|
2012-10-09 07:02:04 +04:00
|
|
|
* FreeRDP: A Remote Desktop Protocol Implementation
|
2011-09-19 18:54:09 +04:00
|
|
|
* Video Redirection Virtual Channel - Audio Device Manager
|
|
|
|
*
|
|
|
|
* Copyright 2010-2011 Vic Lee
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2017-06-06 15:01:41 +03:00
|
|
|
#ifndef FREERDP_CHANNEL_TSMF_CLIENT_AUDIO_H
|
|
|
|
#define FREERDP_CHANNEL_TSMF_CLIENT_AUDIO_H
|
2011-09-19 18:54:09 +04:00
|
|
|
|
2012-09-23 03:25:21 +04:00
|
|
|
#include "tsmf_types.h"
|
2011-09-19 18:54:09 +04:00
|
|
|
|
2022-02-14 16:59:22 +03:00
|
|
|
typedef struct s_ITSMFAudioDevice ITSMFAudioDevice;
|
2011-09-19 18:54:09 +04:00
|
|
|
|
2022-02-14 16:59:22 +03:00
|
|
|
struct s_ITSMFAudioDevice
|
2011-09-19 18:54:09 +04:00
|
|
|
{
|
|
|
|
/* Open the audio device. */
|
2018-02-20 14:15:30 +03:00
|
|
|
BOOL (*Open)(ITSMFAudioDevice* audio, const char* device);
|
2011-09-19 18:54:09 +04:00
|
|
|
/* Set the audio data format. */
|
2019-11-06 17:24:51 +03:00
|
|
|
BOOL(*SetFormat)
|
|
|
|
(ITSMFAudioDevice* audio, UINT32 sample_rate, UINT32 channels, UINT32 bits_per_sample);
|
2011-09-19 18:54:09 +04:00
|
|
|
/* Play audio data. */
|
2018-02-20 14:15:30 +03:00
|
|
|
BOOL (*Play)(ITSMFAudioDevice* audio, const BYTE* data, UINT32 data_size);
|
2011-09-19 18:54:09 +04:00
|
|
|
/* Get the latency of the last written sample, in 100ns */
|
2019-11-06 17:24:51 +03:00
|
|
|
UINT64 (*GetLatency)(ITSMFAudioDevice* audio);
|
2012-08-08 02:42:45 +04:00
|
|
|
/* Change the playback volume level */
|
2018-02-20 14:15:30 +03:00
|
|
|
BOOL (*ChangeVolume)(ITSMFAudioDevice* audio, UINT32 newVolume, UINT32 muted);
|
2011-09-19 18:54:09 +04:00
|
|
|
/* Flush queued audio data */
|
2018-02-20 14:15:30 +03:00
|
|
|
BOOL (*Flush)(ITSMFAudioDevice* audio);
|
2011-09-19 18:54:09 +04:00
|
|
|
/* Free the audio device */
|
2018-02-20 14:15:30 +03:00
|
|
|
void (*Free)(ITSMFAudioDevice* audio);
|
2011-09-19 18:54:09 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#define TSMF_AUDIO_DEVICE_EXPORT_FUNC_NAME "TSMFAudioDeviceEntry"
|
2018-02-20 14:15:30 +03:00
|
|
|
typedef ITSMFAudioDevice* (*TSMF_AUDIO_DEVICE_ENTRY)(void);
|
2011-09-19 18:54:09 +04:00
|
|
|
|
|
|
|
ITSMFAudioDevice* tsmf_load_audio_device(const char* name, const char* device);
|
|
|
|
|
2017-06-06 15:01:41 +03:00
|
|
|
#endif /* FREERDP_CHANNEL_TSMF_CLIENT_AUDIO_H */
|