Changeset View
Changeset View
Standalone View
Standalone View
src/a2dp-codecs.c
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * BluezQt - Asynchronous Bluez wrapper library | ||||
3 | * | ||||
4 | * Copyright (C) 2018 Manuel Weichselbaumer <mincequi@web.de> | ||||
5 | * | ||||
6 | * This library is free software; you can redistribute it and/or | ||||
7 | * modify it under the terms of the GNU Lesser General Public | ||||
8 | * License as published by the Free Software Foundation; either | ||||
9 | * version 2.1 of the License, or (at your option) version 3, or any | ||||
10 | * later version accepted by the membership of KDE e.V. (or its | ||||
11 | * successor approved by the membership of KDE e.V.), which shall | ||||
12 | * act as a proxy defined in Section 6 of version 3 of the license. | ||||
13 | * | ||||
14 | * This library is distributed in the hope that it will be useful, | ||||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
17 | * Lesser General Public License for more details. | ||||
18 | * | ||||
19 | * You should have received a copy of the GNU Lesser General Public | ||||
20 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||||
21 | */ | ||||
22 | | ||||
23 | #include "a2dp-codecs.h" | ||||
24 | | ||||
25 | /* Currently our capabilites are limited to the most common use cases. | ||||
26 | iOS has a fixed stream configuration anyway (for SBC and AAC). */ | ||||
27 | const a2dp_sbc_t sbcCapabilities = { | ||||
28 | .frequency = | ||||
29 | /*SBC_SAMPLING_FREQ_16000 | | ||||
30 | SBC_SAMPLING_FREQ_32000 |*/ | ||||
31 | SBC_SAMPLING_FREQ_44100 | | ||||
32 | SBC_SAMPLING_FREQ_48000, | ||||
33 | .channel_mode = | ||||
34 | /*SBC_CHANNEL_MODE_MONO | | ||||
35 | SBC_CHANNEL_MODE_DUAL_CHANNEL |*/ | ||||
36 | SBC_CHANNEL_MODE_STEREO | | ||||
37 | SBC_CHANNEL_MODE_JOINT_STEREO, | ||||
38 | .block_length = | ||||
39 | SBC_BLOCK_LENGTH_4 | | ||||
40 | SBC_BLOCK_LENGTH_8 | | ||||
41 | SBC_BLOCK_LENGTH_12 | | ||||
42 | SBC_BLOCK_LENGTH_16, | ||||
43 | .subbands = | ||||
44 | SBC_SUBBANDS_4 | | ||||
45 | SBC_SUBBANDS_8, | ||||
46 | .allocation_method = | ||||
47 | SBC_ALLOCATION_SNR | | ||||
48 | SBC_ALLOCATION_LOUDNESS, | ||||
49 | .min_bitpool = MIN_BITPOOL, | ||||
50 | .max_bitpool = MAX_BITPOOL, | ||||
51 | }; | ||||
52 | | ||||
53 | const a2dp_aac_t aacCapabilities = { | ||||
54 | .object_type = | ||||
55 | AAC_OBJECT_TYPE_MPEG2_AAC_LC | | ||||
56 | AAC_OBJECT_TYPE_MPEG4_AAC_LC, | ||||
57 | /*AAC_OBJECT_TYPE_MPEG4_AAC_LTP | | ||||
58 | AAC_OBJECT_TYPE_MPEG4_AAC_SCA, */ | ||||
59 | AAC_INIT_FREQUENCY( | ||||
60 | /*AAC_SAMPLING_FREQ_8000 | | ||||
61 | AAC_SAMPLING_FREQ_11025 | | ||||
62 | AAC_SAMPLING_FREQ_12000 | | ||||
63 | AAC_SAMPLING_FREQ_16000 | | ||||
64 | AAC_SAMPLING_FREQ_22050 | | ||||
65 | AAC_SAMPLING_FREQ_24000 | | ||||
66 | AAC_SAMPLING_FREQ_32000 |*/ | ||||
67 | AAC_SAMPLING_FREQ_44100 | | ||||
68 | AAC_SAMPLING_FREQ_48000) | ||||
69 | /*AAC_SAMPLING_FREQ_64000 | | ||||
70 | AAC_SAMPLING_FREQ_88200 | | ||||
71 | AAC_SAMPLING_FREQ_96000)*/ | ||||
72 | .channels = | ||||
73 | /*AAC_CHANNELS_1 |*/ | ||||
74 | AAC_CHANNELS_2, | ||||
75 | .vbr = 1, | ||||
76 | AAC_INIT_BITRATE(0xFFFF) | ||||
77 | }; |