Skip to content

Commit 8867b72

Browse files
committed
2 parents 560e457 + 97d68ba commit 8867b72

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ Unfortunately this example did not make me happy so I decided to convert it into
1212

1313
## Supported Bluetooth Protocols
1414

15-
As the name of this libariy implies, it supports the A2DP [Bluetooth protocol](https://en.wikipedia.org/wiki/List_of_Bluetooth_profiles) which only provides audio streaming!
15+
As the name of this library implies, it supports the A2DP [Bluetooth protocol](https://en.wikipedia.org/wiki/List_of_Bluetooth_profiles) which only provides audio streaming!
1616

1717
It also supports Audio/Video Remote Control Profile (AVRCP) together with A2DP.
1818

19-
The Hands-Free Profile (HFP), Headset Profile (HSP) and stand alone AVRCP without A2DP are __not__ supported!
19+
The Hands-Free Profile (HFP), Headset Profile (HSP) and standalone AVRCP without A2DP are __not__ supported!
2020

2121
## I2S API / Dependencies
2222

@@ -184,7 +184,7 @@ Similarly to the `avrc_metadata_callback`, ESP IDF v4+ supports selected `esp_av
184184
185185
### Support for AVRC Commands
186186
187-
I have added the following AVRC commmands, that you can use to 'control' your A2DP Source:
187+
I have added the following AVRC commands, that you can use to 'control' your A2DP Source:
188188
189189
- play();
190190
- pause();
@@ -228,11 +228,11 @@ void setup() {
228228
void loop() {}
229229
230230
```
231-
Instead of the ```set_data_callback callback``` method you can also use ```set_data_callback_in_frames``` which uses frames instead of bytes. In Arduio you can also provide a Stream (e.g a File) as data source or a callback which provides streams.
231+
Instead of the ```set_data_callback callback``` method you can also use ```set_data_callback_in_frames``` which uses frames instead of bytes. In Arduino you can also provide a Stream (e.g a File) as data source or a callback which provides streams.
232232

233-
In the examples you can find an implentation that generates sound with the help of the sin() function.
233+
In the examples you can find an implementation that generates sound with the help of the sin() function.
234234

235-
You can also inticate multiple alternative Bluetooth names. The system just connects to the first one which is available:
235+
You can also indicate multiple alternative Bluetooth names. The system just connects to the first one which is available:
236236

237237
```cpp
238238
void setup() {
@@ -266,7 +266,7 @@ Before you clone the project, please read the following information which can be
266266

267267
## Digital Sound Processing
268268

269-
You can use this library stand alone, but it is part of my [audio-tools](https://github.com/pschatzmann/arduino-audio-tools) project. So you can easily enhance this functionality with sound effects, use filters or an equilizer, use alternative audio sinks or audio sources, do FFT etc. Here is a [simple example](https://github.com/pschatzmann/arduino-audio-tools/blob/main/examples/examples-communication/a2dp/basic-a2dp-fft/basic-a2dp-fft.ino) how you can analyse the audio data with FFT.
269+
You can use this library standalone, but it is part of my [audio-tools](https://github.com/pschatzmann/arduino-audio-tools) project. So you can easily enhance this functionality with sound effects, use filters or an equilizer, use alternative audio sinks or audio sources, do FFT etc. Here is a [simple example](https://github.com/pschatzmann/arduino-audio-tools/blob/main/examples/examples-communication/a2dp/basic-a2dp-fft/basic-a2dp-fft.ino) how you can analyse the audio data with FFT.
270270

271271
## Documentation
272272

@@ -278,7 +278,7 @@ You can use this library stand alone, but it is part of my [audio-tools](https:/
278278
I spent a lot of time to provide a comprehensive and complete documentation.
279279
So please read the documentation first and check the issues and discussions before posting any new ones on Github.
280280

281-
Open issues only for bugs and if it is not a bug, use a discussion: Provide enough information about
281+
Open __issues only for bugs__ and if it is not a bug, use a discussion: Provide enough information about
282282
- the selected scenario/sketch
283283
- what exactly you are trying to do
284284
- your hardware

src/A2DPVolumeControl.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,12 @@ class A2DPLinearVolumeControl : public A2DPVolumeControl {
244244
*/
245245
class A2DPNoVolumeControl : public A2DPVolumeControl {
246246
public:
247-
/**
248-
* @brief Override that does nothing - no audio data modification
249-
* @param data Pointer to audio frame data (unused)
250-
* @param frameCount Number of frames (unused)
251-
*/
247+
A2DPNoVolumeControl(int32_t fixedVolume = 0x1000) {
248+
is_volume_used = fixedVolume != 0x1000;
249+
mono_downmix = false;
250+
volumeFactor = fixedVolume; // fixed volume
251+
volumeFactorMax = 0x1000; // no change
252+
}
252253
void update_audio_data(Frame* data, uint16_t frameCount) override {}
253254

254255
/**

0 commit comments

Comments
 (0)