Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Foobar Output for Bluetooth Modules (Read 4430 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Foobar Output for Bluetooth Modules

Assuming the device on which foobar is running is connected to (either PC or Mobile) a Bluetooth sound unit, so if you're playing an mp3 file with 320kbps bit rate, would the Application's output be a decoded PCM Stream (1411kbps), or will foobar pass the file encoded to the module?


(I'm starting to build a Bluetooth audio receiver using an Arduino so if it's not the appropriate forum, plz let me know, any sort of info would be appreciated, Thanks!)

Re: Foobar Output for Bluetooth Modules

Reply #1
Everything is decoded. But the bitrate you mentioned with PCM is only valid for 44.1 kHz 16-bit stereo audio, for example MP3s are decoded to 32-bit float.

Re: Foobar Output for Bluetooth Modules

Reply #2
Thanks!
But it mentions here that:
Quote
Each A2DP service ... supports optionally MPEG-1 Part 3/MPEG-2 Part 3 (MP2 and MP3), MPEG-2 Part 7/MPEG-4 Part 3 (AAC and HE-AAC) ...

so it seems that the Bluetooth module handles some sort of decoding by itself.

 

Re: Foobar Output for Bluetooth Modules

Reply #4
it means that the player won't handle the decoding so the output isn't always PCM and the module handles the decoding task.

I'm just wondering how to handle the audio stream coming in, with methods such as
Code: [Select]
Serial.read()
and then send the output to a DAC via the microprocessor's ports.

Re: Foobar Output for Bluetooth Modules

Reply #5
No. The output of foobar2000 is always PCM.

Re: Foobar Output for Bluetooth Modules

Reply #6
I just suggest you use devices that can handle APTX bluetooth protocol streaming because A2DP usually use SBC codec compression, this method similar to mp3 compression method, but sound quality is worse, that means if you listen to mp3 files via bluetooth device, you'll accept sound of double compressed mp3 file.

Re: Foobar Output for Bluetooth Modules

Reply #7
A2DP
Sound processing using SBC methods has a lot in common with well-known MP3 compression, but the priorities are somewhat different: the main task is not so much to minimize sound loss as to simplify the calculations. Everything should be quick, simple and easy to do, even for the most flimsy mobile processor.

As a result, SBC deals with sound without unnecessary ceremonies - for example, frequencies above 14 kHz are simply cut off during conversion, with the result that the frequency range narrows noticeably. Not surprisingly, even with equal bitrate with MP3 (and SBC allows a bitrate of up to 320 kB / s), the audio in the SBC-encoding sounds much worse.

AptX codec: the best option for a music lover

An even more advanced audio compression is provided by the aptX codec, which is actively promoting CSR in the market for wireless Bluetooth audio. The creators promote it as a means of wirelessly transmitting music "in CD-quality."
In fact, this is not quite the case, although the algorithms underlying aptX, in their work, do resemble the lossless encoders that compress the audio stream without losing audio information. Among the advantages of aptX is the ability to Bluetooth-broadcast MP3 and AAC without additional processing, and hence without degrading the sound.

A special version of aptX Low Latency, sharpened by requests from gamers and movie heroes, also provides a minimal delay in signal delivery - which means watching a movie without lagging behind the replicas of facial expressions.
The aptX codec provides audio transmission with a bitrate of up to 352 kB / s, does not cut the upper register and widens the frequency range to quite solid 10 Hz - 22 kHz (add more "air" to sound stage, but the high complexity of the applied algorithms requires from the mobile processors threefold computational power compared to the base SBC. That is why aptX support is rarely found among “bluetooth” devices, most often in the premium segment of smartphones.

Re: Foobar Output for Bluetooth Modules

Reply #8
As a result, SBC deals with sound without unnecessary ceremonies - for example, frequencies above 14 kHz are simply cut off during conversion, with the result that the frequency range narrows noticeably. Not surprisingly, even with equal bitrate with MP3 (and SBC allows a bitrate of up to 320 kB / s), the audio in the SBC-encoding sounds much worse.

A couple of questions:
1. Why do you say SBC cuts off frequencies above 14KHz?
2. Can you really tell the difference between the original file and one encoded/decoded with SBC at 328 kHz (which is the typical "High Quality" setting for SBC, even though SBC can easily provide higher bitrates)?  I have some test files to try if you'd like to listen.