• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef REMOTE_AUDIO_RENDERER_SINK_INTF_H
17 #define REMOTE_AUDIO_RENDERER_SINK_INTF_H
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 typedef struct {
23     const char *adapterName;
24     uint32_t openMicSpeaker;
25     enum AudioFormat format;
26     uint32_t sampleFmt;
27     uint32_t sampleRate;
28     uint32_t channel;
29     float volume;
30     const char *filePath;
31     const char *deviceNetworkId;
32     int32_t device_type;
33 } RemoteAudioSinkAttr;
34 
35 int32_t FillinRemoteAudioRenderSinkWapper(const char *deviceNetworkId, void **wapper);
36 int32_t RemoteAudioRendererSinkInit(void *wapper, RemoteAudioSinkAttr *attr);
37 void RemoteAudioRendererSinkDeInit(void *wapper);
38 int32_t RemoteAudioRendererSinkStart(void *wapper);
39 int32_t RemoteAudioRendererSinkStop(void *wapper);
40 int32_t RemoteAudioRendererSinkPause(void *wapper);
41 int32_t RemoteAudioRendererSinkResume(void *wapper);
42 int32_t RemoteAudioRendererRenderFrame(void *wapper, char *data, uint64_t len, uint64_t *writeLen);
43 int32_t RemoteAudioRendererSinkSetVolume(void *wapper, float left, float right);
44 int32_t RemoteAudioRendererSinkGetLatency(void *wapper, uint32_t *latency);
45 int32_t RemoteAudioRendererSinkGetTransactionId(uint64_t *transactionId);
46 #ifdef __cplusplus
47 }
48 #endif
49 #endif // AUDIO_RENDERER_SINK_INTF_H
50