HiRes беспроводной звук на iPhone, или как проиграть LDAC и прочую ересь на iPhone

В последнее время наткнулся на несколько комментариев от «аудиофилов», которые утверждают, что Apple сделала зло отказавшись от 3.5мм разъёма, переводит воспроизведение музыки на bluetooth, но не с тем кодеком, которым бы хотелось. В следствии этого  качество звука будет полным Г., а iPhone после этого нельзя рассматривать к покупке.

Пример комментария номер 1.

Пример комментария номер 2.

 

Пример комментария номер 3.

Сразу скажу, hi-fi аппаратурой дома не владею, но Aphex Twin от Вороваек отличаю и всегда слышу mp3 сжатие с низким битрейтом. Сделать research так же побудило то, что 1) владею AirPods, и 2) желание разобраться «неужели Apple кидает с тем вопросом в котором всегда разбиралась». Пришлось убить пару вечеров, чтобы расставить все точки над i.

Итак, основные претензии.

  1. AAC кодек хуже AptX\HD и LDAC, т.к. потолок кодирования 264 кбит/с
  2. AAC вообще не для аудиофилов, только FLAC\ALAC
  3. Apple жмется деньгами, чтобы лицензировать AptX\LDAC
  4. AirPods искажает AAC

Замечание — я осознаю, что ААС кодек с потерей информации, а LDAC (иногда) без потерь, как FLAC.

AAC кодек хуже AptX\HD и LDAC, т.к. потолок кодирования 264 кбит/с

Не буду расписывать теорию современного кодирования информации, особенно аудио, но хочу сразу сказать, что битрейт, т.е. скорость потока информации, чтобы не было пауз — вообще не показатель КАЧЕСТВА. Т.е. в некоторой абстрактной теории можно изобрести кодек, чтобы с потоком 1кбит\с было качество как LDAC. Информацию можно запаковать хоть 1 МБ в 1КБ, главное, чтобы можно было потом её распаковать 🙂

Прошерстив кучу специализированных форумов выводы такие, в терминах «комментаторов»:

  1. AAC может иметь битрейт больше чем 264 кбит\с. Например — 529 kbit/s  (см wiki https://en.wikipedia.org/wiki/Comparison_of_audio_coding_formats  ) . И самое интересное, что даже больше! Например, вплоть до

    Это ж, что получается, что AAС круче LDAC(990 kbit/s) и AptXHD (576 kbit/s.)?!

     

  2. Идея кодека (не только AAC) в том, чтобы в меньшем объёме передать такое же или ДОСТАТОЧНОЕ количество информации. Поэтому, на hi-fi форумах пишут, что AAC с VBR(оказывается, у AAC есть и такая опция) может уходить за 320 кбит\с, и на слух при слепом прослушивании вы не услышите разницу между FLAC и таким AAC звуком. И люди которые занимаются сохранением музыки, например какой-то сотрудник библиотеки в США, архивируют музыку в AAC. Зачем впустую тратить место на FLAC файл на носителе, если ушами не будет слышно разницы?
  3. 96 kHz\24 bit — магическое заклинание которым сыплют «аудиофилы». Выяснятся, что
    • Почти все люди на очень хороших колонках не слышат разницу между 44(8)\16 и 96\24. Спрашивается, а зачем тогда делают в 96\24? Ответ: Данная точности нужна только при ПРОИЗВОДСТВЕ музыки, чтобы быть точнее при использовании фильтров, мастеринге и т.п. Источник: https://people.xiph.org/~xiphmont/demo/neil-young.html
    • При этом, естественно AAC можно закодировать с 96 kHz и 24 бит.
  4. Даже mp3 с 320КБ\с битрейтом звук в слепом тестировании на hi-fi аппаратуре не отличим от оригинала. Если слышите артефакты, то надо смотреть как сжимали и чем разжимаете, т.к. это всё имеет значение. см. 346532

 

AAC вообще не для аудиофилов, только FLAC\ALAC

Входе подготовки материала читал форум — www.head-fi.org, там старожилы-аудиофилы пишут, что сейчас они собирают музыку в AAC с VBR 320 кбит\с. В силу специфики кодека повышать битрейт нет смысла, звук прозрачен уже на 256 кбит\с, но VBR на 320 даёт возможность сохранить еле слышимые детали. Повторюсь, люди понимают, что нет смысла тратить на трек 50МБ, когда тоже самое будет и с 10МБ. Собирать FLAC коллекцию, это как искать аналоговый винил при наличии FLAC файла.

Кстати, среднестатистический трек во FLAC  имеет в среднем битрейт на 650-700 кбит\с.

Откуда вообще этот «страх» про AAC и 264(256) кбит\с взялся? Отвечаю: Из-за того, что Apple в Itunes продаёт треки с таким качеством и вещает через Apple Music.  256 мало? Ок, бери FLAC и кодируй AAC в 320 кбит\с + VBR.

Apple жмется деньгами, чтобы лицензировать AptX\LDAC

Вопрос один — зачем лицензировать МАРКЕТИНГОВЫЕ фишки других производителей?!

AptX(HD) — это кодек со потерями при сжатии. ААС тоже с потерями , но при этом чтобы пустить AptX HD нужно иметь полосу в 560 кбит, а для AAC достаточно 320-360.

LDAC — выясняется, что у кодека несколько режимов, и «потери» отсутствуют только при полосе 990 кбит. И тут мы плавно переходим к основной канве использования кодеков — передача звука с наилучшим качеством по блютусу.

Ширина полосы блютус соединения.

Как правило, в вакууме при блютус соединении можно добиться передачи данных 1 мбит. В новых версиях это 2, а то 3 мбит. Но дело в том, что если использовать блютус в типичной городской среде, то на него действуют не только помехи (wifi, 3g, lte),  но так же необходимо передавать служебную информацию, и получается, что от чистого канала останется +- 1\2 заявленной скорости.

Наткнулся на статью, как человек разбирался в вопросе, почему колонка затыкается будучи за его спиной и в 4х метрах от ноутбука используя AptX кодек- https://habr.com/post/201000/

Sic! AptX уже начинает «икать», если вы будете использовать Macbook Air, bluetooth колонку, и встанете между ними. Это для ширины канала 360 кбит. А что же было бы, если вещать через AptX HD или LDAC?

 

 

AirPods искажает AAC

Если вы не заглянули в статью на Хабре, то вот скриншот где согласно протоколу устройство показывает явным образом какой кодек оно понимает

Это был пример с AptX, а вот лог при подключении AirPods к Macbook

 

Блютус демон сообщает, что устанавливает кодек ААС для приёма аудиопотока, и готов поддержать VBR.

Выходит, что ААС можно спокойно транслировать напрямую в устройство. Кстати, Хуавеевские наушники тоже поддерживают ААС, в то время как Самсунговские IconX поддерживают только SBR и свой костыль в виде SSC(Samsung Scalable Codec)

И раз мы в разделе про AirPods. Не секрет, что в них содержится чип W1 который Apple специально спроектировала для bluetooth устройств. AirPods очень маленькие, каждый мм на счету, я думаю, что декодер AAC так же реализован железно в W1, и возвращаясь к пункту про «жмотству» Apple — вопрос, зачем Apple ещё реализовывать и тратить драгоценные мм на всякие AptX и LDAC которые не дают ровным счет ничего?

Резюме

Как только вам повстречается жертва маркетинга от Квалкома и Сони, и начнёт нести чушь про превосходство AptX \HD и LDAC над AAC отвечайте:

  1. ААС способен на  те же битрейты и частоту дискретизации, что и конкуренты
  2. Даже на хорошей акустике не будет слышно разницы между ААС VBR 320+ и FLAC\LDAC
  3. Если нет разницы, зачем платить больше?

 

Так всё же — как проиграть LDAC на iPhone

Всё просто. Вам необходимо реализовать этот кодек и A2DP поверх открытого в iOS L2CAPP, и подключиться к Sony нашуникам. https://developer.apple.com/documentation/corebluetooth/cbl2cappsm?language=objc
Реализацию кодека можно попытаться взять из Android Open Source Project.

 

При подготовке материала использовал:

Bluetooth iPhone vs AptxHD LDAC

Unfortunately, there is no point to distributing music in 24-bit/192kHz format. Its playback fidelity is slightly inferior to 16/44.1 or 16/48, and it takes up 6 times the space.

OK, so 192kHz music files make no sense. Covered, done. What about 16 bit vs. 24 bit audio?

None of that is relevant to playback; here 24 bit audio is as useless as 192kHz sampling. The good news is that at least 24 bit depth doesn’t harm fidelity. It just doesn’t help, and also wastes space.

Professionals use 24 bit samples in recording and production [14] for headroom, noise floor, and convenience reasons.

16 bits is enough to span the real hearing range with room to spare. 

In 554 trials, listeners chose correctly 49.8% of the time. In other words, they were guessing. Not one listener throughout the entire test was able to identify which was 16/44.1 and which was high rate [15], and the 16-bit signal wasn’t even dithered!
Lossless formats

It’s true enough that a properly encoded Ogg file (or MP3, or AAC file) will be indistinguishable from the original at a moderate bitrate.

But what of badly encoded files?

Twenty years ago, all mp3 encoders were really bad by today’s standards. Plenty of these old, bad encoders are still in use, presumably because the licenses are cheaper and most people can’t tell or don’t care about the difference anyway. Why would any company spend money to fix what it’s completely unaware is broken?

Moving to a newer format like Vorbis or AAC doesn’t necessarily help. For example, many companies and individuals used (and still use) FFmpeg’s very-low-quality built-in Vorbis encoder because it was the default in FFmpeg and they were unaware how bad it was. AAC has an even longer history of widely-deployed, low-quality encoders; all mainstream lossy formats do.

Lossless formats like FLAC avoid any possibility of damaging audio fidelity [23] with a poor quality lossy encoder, or even by a good lossy encoder used incorrectly.

https://people.xiph.org/~xiphmont/demo/neil-young.html

Thought to be based loosely on FLAC (Free Lossless Audio Codec), both use Linear Prediction, Apple have not released any technical documents on Apple lossless, 3rd-party manipulation of Apple Lossless files are solely to the reverse engineering work of David Hammerton [craz.net]. Apple Lossless files can be decoded at relatively high speed, in comparison to other lossless codec. — http://www.applelossless.com

It’s worth to add that A2DP limits the available maximum bit rate to 320 kbps for mono and to 512 kbps for stereo modes allowing the use of many other codecs besides SBC. So audio manufacturers (of headphones especially) have wide choice of compression technologies capable of delivering high definition sound through the wireless digital channel at reasonable cost. — http://soundexpert.org/news/-/blogs/bluetooth-audio-quality-a2dp

http://soundexpert.org/encoders-320-kbps

http://soundexpert.org/news/-/blogs/audio-quality-of-bluetooth-aptx

With A2DP’s maximum audio bandwidth of 728kbit/s, it’s at least possible to start approaching what we’d call “high-quality audio” with the basic standard alone. (CD quality audio, uncompressed, is approximately 1400kbit/s.) — https://www.howtogeek.com/338750/whats-the-difference-between-bluetooth-a2dp-and-aptx/

Accessory Design Guidelines for Apple  Devices  https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf 

In practice, most people won’t be able to hear a difference in their 320kbps MP3s. A 256kbps AAC file is roughly equivalent to a 320kbps MP3 file audio quality-wise, and Apple’s bitrate for AAC audio over Bluetooth is ~250kbps. However, as I said, in theory you’re losing quality because you’re converting one lossy format to another. I would imagine the resultant audio quality is still better than SBC, though. … SBC usually runs at 320kbps… No. Phone will use AAC if headphones support it. AAC is lossy, so Tidal will be lossy. You need newer Androids phone to get aptx, aptx HD, or LDAC Bluetooth codecs from a phone and need a headphone that has one or more of those codecs for better, lossless/near lossless SQ…Also, AptX and AptX HD require a special chip in both the phone and bluetooth headset, and the reason you see most truly wireless buds forego it is because they really do take a lot more battery. As for claims of AptX being lossless… it’s marketing bullshit. AptX is slightly behind AAC audio when it comes to SQ. AptX HD is 576 kbps, which is pretty fucking good, and better than bluetooth AAC, though, it’s still not lossless.

Sony’s new format LDAC is the only truly near-lossless wireless format right now. It’s also not part of A2DP and is not an open standard….This is incorrect. aptX HD can be operated in lossless, bit-identical, binary copy mode… Only in CD quality though and when emitter and receiver are close enough to provide 700kbps bandwich you need for lossless PCM coding.

aptX HD when streaming 44khz-16bit audio is lossless, like in bit stream identical to original. Higher bitdepths and sampling rates are not.Here’s your citation:

http://www.fast-and-wide.com/images/stories/White_papers/apt-x-lossless.pdf

That’s the original whitepaper explaining the behavior of aptX-HD (then called aptX lossless). It even contains compression ratios vs a reference lossless codec, FLAC. Given the bluetooth channel is good enough to sustain lossless/bit-identical PCM data stream most of the time, it’s definitely a lossless/bit-identical codec at CD quality.

Three things happened after 2009 with aptX lossless:

  • Qualcomm bought the technology
  • Qualcomm added 24/96khz to this, which can’t be accomplished losslessly/bit-identically
  • Qualcomm rebranded the whole shebang to aptX HD and hid the technical details behind marketing parlance

So my best way to explain is that aptX HD is a truly, actually the only, lossless bluetooth codec, but only at CD qualities.

Then, there is AptX, which requires a special chip to implement (Again, in both transmitting device and receiving device). While it does sound better than SBC, it’s just not as good as AAC/MP3 over bluetooth. With AptX you’re still taking a lossy file and transcoding it to another Lossy format (AptX over bluetooth is not lossless, though they claim to be) before sending it through the air. Like MP3 to SBC, MP3 to AptX just leads to further loss in quality — It’s just “less bad” than SBC, so it sounds better. Most android phones support AptX, and with Android O, you’ll be able to select Bluetooth AAC as well (It’s a new setting in the developer options!)

There’s nothing at all wrong with passing that audio through, and the mixing it only when it needs to be mixed. Apple is really clever about how they handle audio. Something about them being a staple for audio professionals gives them plenty of expertise to pull this off.

It’s not that hard to swap over a direct connection to mixing within 10ms of a system sound coming in, and it would not cause crackling and noises…

 https://www.reddit.com/r/headphones/comments/7db9tq/about_aacsbc_codecs_over_bluetooth_on_iphone_x/

http://www.fast-and-wide.com/images/stories/White_papers/apt-x-lossless.pdf

We recently investigated Sony’s LDAC codec, which similarly claims high-res audio transmission through Bluetooth but is in fact a lossy codec that aims at “near Hi-Res Audio”, by which they mean indistinguishable from a 24-bit/96kHz input (avhub.com.au/ldac).

S+I: Can you confirm whether aptX HD is a lossless or lossy codec? 

JM: The aptX HD is technically a Lossy codec. However as aptX HD uses a relatively gentle compression ratio of 4:1 it is non-destructive in nature. As it is based on ADPCM and not psycho-acoustic perceptual based principles, aptX HD uses predictive analysis rather than attempting to replicate the performance of the human hearing via a synthetic ear. — https://www.avhub.com.au/news/sound-image/aptx-hd—lossless-or-lossy-442124

  • 9 quality levels for variable bitrates (VBR) encoding (LC only)
  • Constant bitrates (CBR) supported for LC: 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 640, 768, 896 and 1024 kbps (maximum bitrate depends on the sampling rate and number of channels)
  • Sampling rates supported for LC: 8, 11.025, 16, 22.05,
    24, 32, 44.1, 48, 64, 88.2 and 96 kHz

https://www.mainconcept.com/fileadmin/user_upload/datasheets/AAC_SDK_DATASHEET.pdf 

Мне не нужны экстрасенсорные способности, чтобы слышать разницу. Вы слушали мп3 на больших колонках? Под большими я имею в виду какие-нибудь клубные Turbosound. Слушали и не услышали разницу? Поздравляю. А я слышу. Звук тупо глухой.

ОтветитьПожаловаться

Это может быть связано с ошибками при кодировании mp3 или же при его декодировании на устройстве воспроизведения. Если все будет работать корректно, то разницу в слепом прослушивании вы не услышите ни на каком оборудовании. — https://habr.com/post/346532/

According to Apple, audio files compressed with its lossless codec will use up «about half the storage space» that the uncompressed data would require. Testers using a selection of music have found that compressed files are about 40% to 60% the size of the originals depending on the kind of music, which is similar to other lossless formats.[5][6] Furthermore, compared to some other formats, it is not as difficult to decode, making it practical for a limited-power device, such as older iOS devices.[7][8] — https://en.wikipedia.org/wiki/Apple_Lossless

The biggest problem is that the first step you need to connect the A2DP profile of the device,and then the audio stream is automatic,unless you need to control the details of A2DP operation. — https://stackoverflow.com/questions/4535988/bluetooth-a2dp-api-support-on-ios

——————

I have a nice portion of my library recorded in Itunes Plus (which is Apple AAC 256 VBR). For my ear it is transparent, full stop. The chance that I am guessing on ABX testing is 100 percent (sorry about that Bigshot, I am also practicing listening for the gurgling aquariums at 96 kbps in Frau CBR on the Sammy Davis, Jr., CD, now, I promise, although my CODEC has not yet seized up. I do look forward to that though.). As to whether Apple AAC 256 VBR caps out at 256 kpbs, the answer is no, and in my library, the average bitrate is considerably higher than 256 kbps for most songs ripped in Apple AAC 256 VBR. The lowest is 233 kbps for only two songs (a song from the Duke Ellington Blanton-Webster band, and a Pokemon song (it’s one of my kid’s, but I rip everything in the family and we share an Apple Music account). The Apple AAC 256 VBR rips max out at an average bitrate of 304 kbps (of course some passages in the file will be higher), interestingly for a few 1950s and 1960s jazz recordings (Oscar Peterson, Grant Green, Eddie Harris); and at 303 kbps I have a lot of modern jazz recordings. The Apple AAC 256k VBR encoder doesn’t seem to up the bitrate that high even for the better classical recordings. The highest classical track is a Dvorak Slovic dance at 290 kbps. The range from 233 kbps to 304 kbps is a pretty smooth progression literally including muliptle instances of every single bitrate in-between. The median is definitely 256 kbps on the button—I don’t even need to count—there are a ton of tracks at that bitrate. The mean average is higher. Just looking at the distribution I’d ballpark it at 275 kbps. — Post #79

I’m not sure what the iTunes Plus preset within iTunes uses, but both Apple Music and the iTunes Store use constrained VBR which does not exceed 256 Kb/s, but can dip below it. True VBR can exceed 256 Kb/s. If you encode using qAAC you can choose between CVBR and TVBR. Even 256 Kb/s CBR has been shown to be completely transparent. — Post #80

I’m not sure what the iTunes Plus preset within iTunes uses, but both Apple Music and the iTunes Store use constrained VBR which does not exceed 256 Kb/s, but can dip below it. True VBR can exceed 256 Kb/s. If you encode using qAAC you can choose between CVBR and TVBR. Even 256 Kb/s CBR has been shown to be completely transparent. — Post #80

The Itunes Plus preset is the default Itunes rip, at least on my Windows Itunes—256 Apple AAC VBR, with most tracks encoding above that on average, and a few encoding below that on average, unless Foobar2000 is giving me totally bogus data, which I guess is possible. So I guess you are more likely to get a better rip from a CD using Itunes Plus than off of the Apple Music store. But I think both would be transparent, and the file from the store would probably (but not always) be smaller, which would arguably be better in some ways.

Edit: I did get a Sun Ra recording off of the Itunes store once for better sound quality—I had digitized the original LP. Apple has some weird thing lately where they remaster some Sun Ra music and are the only ones distributing it. Since I like Sun Ra in my more open-minded moments I noticed it. Anyway, there was harsh distortion at peaks on the Apple version that was not on the LP. I don’t know where in the chain the distortion was introduced—the remastering, the encoding, or somewhere else.

Just joking around, I like to call Itunes Plus «Apple AAC 256 VBR, with A1 sauce,» but now I guess there may really be something to it. — Post #81

Here I go again quoting myself.

I just installed the Columns UI Interface for Foobar 2000. It gives you a real-time display of kbps rates as a song plays. For albums ripped with Itunes Plus the Columns UI tells me that the encoder can go well over 320 kbps at a given time for a track encoded at 256 VBR. The median average bitrate for a track ripped at this setting is definitely 256 kbps on the button, but it can go much, much higher..For example, on Band Call from the CD release of Oscar Peterson’s album Night Train, Foobar says that for a 256 Itunes Plus rip the average bitrate is 304 kbps, and the real-time indicator for the Columns UI interface (I am watching right now) gets up to as high as 362 kbps, well over 320 kbps. For the opening of the song, the encoder spends most of the time over 320 kbps. And this is for the 256 kbps setting for Itunes Plus. That is one of three of the most demanding tracks in my library according to the Itunes AAC encoder, so for most tracks you won’t get that result. But I have seen the bitrate going up over 320 kbps on other Itunes Plus 256 kbps rips as well. I just chose one of my most demanding tracks as a case study. So I do think Itunes Plus is definitely Apple AAC VBR with A1 sauce. — Post #84

aptX produces clearly audible artefacts when presented with a steadily rising/falling tone, or more than one tone. That by itself should be a red flag.

The only good thing about it is latency — usually much lower than AAC.

LDAC might be better than AAC or aptX (if only due to the massive bitrate jump), but «better than transparent» is still transparent. And higher bitrate means much higher battery drain. — Post #89

The OS usually runs the mixer at 24/48 in shared mode and will resample the music. aptX HD being a lossly codec does not have a bit-depth when transmitted. The decoding process will reproduce the equivalent of a 24-bit dynamic range. — Post #78

Except that aptX audibly degrades the sound in certain frequencies and AAC is transparent. — Post #134

The difference between AAC and MP3 is subtle and probably impossible to ABX at 256 kb/s. aptX causes audible degradation which ruins the listening experience in particular songs if you know what it’s supposed to sound like. This happens only in particular notes in particular songs, so it’s a non-issue 95% of the time. I have not heard aptX HD yet so I can’t comment on its subjective quality.

This document shows other flaws of aptX.

https://docs.wixstatic.com/ugd/fb72a4_a6a76213617c46c38213e298784bff55.pdf  Post #138

https://www.head-fi.org/threads/radsone-earstudio.867366/page-22#post-14086297

My take away from this is that aptX and aptX HD are barely better than SBC. They are essentially just low bit-depth ADPCM with variable noise floor across bands. The audible artefacts are probably due to implementation flaws rather than the codec itself.

AAC and MP3 are vastly superior codecs and it’s laughable to even compare them to low bit-depth ADPCM. It’s like comparing FM radio to a modern digital connection.

SBC and aptX are relics from an era where manufacturing low-power chips was challenging.  Post #139

AAC is transparent at around 256 — Post #146

For you maybe, Apt X HD is a transmission protocol, which means is better to use higher bandwidth hardware to achieve better transparency. 576 Kbps is a step forward than assuming everyone’s gear can only handle no better than AAC. Come on , it’s obvious, to pretend the math is out is revealing what you think about Apple.

When I was done, I found that Fraunhofer 320 was *almost* transparent, but I had one CD that could make it artifact slightly. LAME MP3 was perfectly transparent at 320. And AAC was transparent at 256. I chose AAC 256 VBR as my standard setting for my music server. It took nearly two weeks full time, but it was worth it to me because — Post #172

I’m talking about sound quality, not math. Bigger numbers don’t automatically mean better sound. The codec has an impact on the quality of the encoding as well.

Would you like to hear one of my sample files for yourself? I can send you either a FLAC or ALAC. It has ten different samples, all the same music. The samples consist of Frau, LAME and AAC and 192, 256 and 320. One of the samples is lossless. You tell me which one is which. I’ll tell you how you did. Then we’ll talk about what codec and bitrate is necessary to achieve transparency. (Hint: Redbook is overkill)

By the way, 192 Fraunhofer MP3 is not transparent. If you asked me before you started encoding your library, I would have told you to use LAME 320 or AAC 256. — Post #174

AAC is fully transparent at AAC 256 VBR. — Post #184

Both lossless and AAC 256 VBR sound the same. — Post #186

Also, the only time that AAC might have phase problems is if you choose joint stereo at too low of a data rate. No one uses joint stereo any more because just about everyone is using the regular stereo setting at a data rate that supports complete transparency.

I have the right equipment and that’s what I’ve used for my testing. All of my equipment is audibly transparent too.

we can’t hear the difference between CD audio and iTunes plus. — https://cdvsmp3.wordpress.com/cd-vs-itunes-plus-blind-test-results/

sdsad

I’ve compared AAC 256 VBR to lossless on high quality equipment using careful controls. I posted a couple of published tests that showed that there was no audible difference to trained ears or on high end equipment. That is evidence to support my statement that AAC 256 VBR sounds every bit as good as FLAC. Why have files that are 5 to 10 times larger if they don’t sound better?

You say that lossy is going to disappear. The opposite is true. Compressed audio and video dominates the market and there’s no indication that it won’t continue to do so. I haven’t seen you present any evidence that AAC 256 VBR isn’t audibly identical to lossless, and I haven’t seen you cite any evidence to support your argument that compressed formats are going away. Do you have anything to back that up? I’m actually curious to see what you base those ideas on. — Post #194

If you’re streaming AAC 256 VBR from Google Play, the sound quality is identical to when you play the same songs in lossless at home. If there is a difference, it’s because your portable equipment isn’t as good as your home equipment, not because of the file itself. I’m not familiar with AptX HD, but I would imagine that would sound the same too.

By the way, AAC 256 VBR has the same dynamic range as a CD. High bitrate AAC has the same frequency response too. I don’t know if you’re aware of it, but VBR allows you to redistribute bandwidth and if needed actually *exceed* the data rate you have it set for. if you encode AAC 320 VBR, the data rate can go as high as 460, if the music requires it. (I don’t know what kind of music would though. I find that 256 VBR is plenty for any kind of music.) That might make you feel good if you want to judge sound quality by the numbers. Post #196

Let’s look at 192 KHz for a second… complete waste of space for me, since both my ears and any possible equipment can simply not retrieve that much detail, it’s overkill, but I have nothing against it. — Post #199

Seriously, I cannot for the life of me hear the difference between 256k Itunes Plus and the source on anything. I have all of the original CDs in vinyl jackets so they don’t take up too much space if I get freaked out about it. I — Post #206

If you agree that AAC 256 VBR sounds exactly the same as lossless, what advantage is there to maintaining your music library in lossless? — Post #209

aptX HD just uses more bits per sub-band than aptX. It’s still esentially transmitting ADPCM which is grossly inefficient compared to psychoacoustic codecs.

All aptX implementations I’ve heard have audible frequency response distortion — this should not happen if it was just bit-depth reduction, so it’s most likely an implementation flaw. The AAC implementation on the same Bluetooth devices don’t have this problem. — Post #211

I believe 24 bit sources can be encoded very well with AAC and when decoded, can render to 24 bit, but of course, not over Bluetooth (yet?)

Current Bluetooth (up to 4.2) limits AAC to 256Kbps — it might have been encoded from a 24 bit source, but decoding that level back into 24 bit probably wouldn’t really get closer to the original than decoding into 16 bit at that sample rate.

AAC can encode larger data rates of course for storing rather than streaming, so it’s a good choice to use for 24 bit source files if you employ a larger data rate that can reproduce well back into 24-bit.

That’s exactly what AptX HD is, the larger data rate of 576 Kbps allows for better reproduction into 24 bit from 24 bit source files — not by a lot, but still mostly more accurate than 16 bit rendering.

Personally, I would choose AAC over AptX HD at the same data rate, but Bluetooth doesn’t allow it, so I use AptX HD. — Post #228

Bit depth is only meaningful in reference to a PCM digital signal. Non-PCM formats, such as lossy compression formats, do not have associated bit depths.

https://en.wikipedia.org/wiki/Audio_bit_depth     Post #230

Mastered for iTunes means that the source is a studio quality master (i.e.: 24/96), and the encoding is customized to make it as efficient and high quality as possible. But the end result is still AAC 256 VBR. That isn’t a bad thing though, because AAC 256 VBR is audibly transparent. With human ears, you won’t be able to discern it from the master. — Post #236

16-24 bit. The aptX implementation of ADPCM does not use sufficient bits for anything close to lossless representation. It’s not that audible to humans, but a spectrogram shows the loss immediately — and it’s far worse than MP3 or AAC. — Post #247

explain post — Post #261

A lot of us here have verified the transparency of high data rate AAC for ourselves. We aren’t depending on old or obsolete or cheap equipment. In fact I cited a published test that showed that AAC was audibly transparent on current high end equipment too. Did you read that?  Post #264

——

I’m in the process of trying the Sony WH-1000XM2 with my Galaxy S8 (Qualcomm chipset) on Oreo. The biggest problem is LDAC on high quality mode, while listening to Tidal (HIFI) or other good sources (even local on my phone). Sound is too often interrupted when the phone is in a certain position (like on my belt , in the case). Sound is good if I’m handing the phone in front of me, which is not really useful… move the phone 20cm on the left or right and sound is garbage. Maybe the Oreo implementation of LDAC on the S8 Bluetooth is not very good. I will try the AptX HD mode (forcing it via Dev Options on the phone). SBC works well but… 

I could listen on wire and still have NC, but that defeat the purpose of a wireless headphone… — https://www.androidauthority.com/sony-ldac-codec-790690/

Magnus Persson: NOT necessarily wrong! If you compress most audio cds with the highest level FLAC, level 8, while they can range quite a bit, they usually are around 750-950kbps. If you aren’t aware…a compressed FLAC of a CD PCM file (16bit_44.1kHz) is IDENTICAL to that PCM file when decoded, so a 750-950kbps FLAC would certainly fit in the 990kbps range. — https://www.androidauthority.com/sony-ldac-codec-790690/

A trawl through the AOSP libldac library also suggests that Sony’s codec is using some form of lossless Huffman coding in conjunction with re-quantization to slim down file sizes. This means that additional lossless compression is used to trim the file down further, in a similar vein to FLAC and even part of the MP3’s encoding pipeline. This is likely also what’s helping to shrink down Sony’s transmission size further. — https://www.androidauthority.com/sony-ldac-codec-790690/

As I said earlier, it works perfectly, and CLEARLY sounds better than using any apt-x headphone dongle. Being able to bypass the crappy iPhone/iPad headphone circuitry and going direct out of the lightening port makes a huge difference.-   https://forums.macrumors.com/threads/bluetooth-a2dp-apt-x-bluetooth-4-0-headsets.1349467/page-2

Adapter noise in DAC — https://ifixit.org/blog/8448/apple-audio-adapter-teardown/

96kHz AAC — https://en.wikipedia.org/wiki/Advanced_Audio_Coding#AAC_Low_Delay AAC supports inclusion of 48 full-bandwidth (up to 96 kHz)

8–529 kbit/s — https://en.wikipedia.org/wiki/Comparison_of_audio_coding_formats
576 kbps — https://en.wikipedia.org/wiki/AptX

«Near lossless» coding maintains a high-definition audio quality, retaining audio frequencies up to 20 kHz and a dynamic range of at least 120 dB. Its main competitor is LDAC codec developed by Sony.

 LDAC is a lossy codec  https://en.wikipedia.org/wiki/LDAC_(codec)

Most early papers using blind listening tests concluded that differences are not audible by the sample of listeners taking the test.[16] Blind tests have shown that musicians and composers are unable to distinguish higher resolutions from 16-bits 48 kHz[17] One 2014 paper showed that dithering using outdated methods (rectangular unshaped dither, rather than the industry standard triangular dither) produces audible artifacts in blind listening tests.[18] — https://en.wikipedia.org/wiki/High-resolution_audio

термины — https://trashbox.ru/link/bluetooth-codecs-faq

Does anyone know for sure, if fhgaacenc (from Winamp) and qaac (frontend to Apple Core Audio) can encode 24bit/96kHz and decode back to 24bit/96kHz?

AAC doesn’t have a bit depth, so if you really want to you can keep it at 24 bits when you downsample to 44.1 or 48 kHz. (Even if the encoder does use all 24 bits, you’ll probably never come across a situation where the difference is audible.)

….
I have tried the 96kHz encode and both fhg and qaac encoded files decode to a 96kHz file in jRiver if the HE / SBR option is used when encoding. Without the HE switch they decode to 48kHz. 

Re. 24bit output, is it possible to force 24bit output when decoding. In the meantime I am aware that an aac file does not have a «bit» oriented structure. And it also is not a question whether there is an audible difference between 16bit or 24bit decode. I am just curious whether the encode / decode chain supports a decode to 24bit.

….
The allowed sampling rates for AAC-LC include:

96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000
https://hydrogenaud.io/index.php/topic,108019.0.html

Beyond CD-Quality: Advanced Audio Coding (AAC) for High Resolution Audio with 24 bit Resolution and 96 kHz Sampling Frequency
https://www.iis.fraunhofer.de/content/dam/iis/de/doc/ame/conference/AES-111-Convention_Beyond_CD-Quality-24-96HighResolutionAAC_AES5476.pdf

http://marlene-d.blogspot.com/2013/11/mp3-and-other-hires-formats.html

Converting 24 bit FLAC to AAC (QAAC) — https://hydrogenaud.io/index.php/topic,115246.0.html

AAC is a lossy format (like MP3), and as Wikipedia (indeed, the same article you linked to) explains:

Bit depth is only meaningful in reference to a PCM digital signal. Non-PCM formats, such as lossy compression formats, do not have associated bit depths. For example, in MP3, quantization is performed on PCM samples that have been transformed into the frequency domain. — https://superuser.com/questions/553552/how-to-determine-aac-bit-depth

44.1 kHz × 16 bits × 2 = 1,411.2 kbits/second — https://www.epiphan.com/blog/audio-encoding-demystified/

https://images.apple.com/itunes/mastered-for-itunes/docs/mastered_for_itunes.pdf

This codec sets itself apart from aptX and aptX HD with its three different connection modes for transferring data. The “Connection” mode connects at 330 kbps, which, in truth, is slightly slower than the SBC codec. Its “Normal” mode ups the rate to 660 kbps, and the “Priority” mode is capable of sending data at a blazing 990 kbps, significantly higher than the aptX or aptX HD. — https://www.maketecheasier.com/sbc-vs-aptx-vs-aptx-hd/

https://stereo.ru/to/ica-chto-takoe-bluetooth-kodek-aptx-hd-ili-besprovodnoy-hi-res-na-podhode

https://www.reddit.com/r/headphones/comments/90jja1/android_80_aptx_vs_aac/

As an audio app developer, I agree completely regarding quality! That said, it’s standard practice to work with PCM. A normal audio architecture for an app and operating system looks something like this:

  1. App decodes a sound file (AAC) into floating point PCM samples.
  2. App applies effects or changes volume (optional)
  3. App hands those PCM samples to the OS
  4. The OS adds those samples with other apps’ samples, system sound effects, etc.
  5. The final mixed result is converted to the hardware’s audio format (usually some form of PCM: floating point stereo, 24-bit stereo, 16-bit stereo, etc) and send to the hardware.

You can test this yourself by converting an MP3 file to an AAC file at a target bitrate of 256 kbps (the maximum bitrate supported by A2DP). You probably won’t be able to hear the difference.
https://www.reddit.com/r/apple/comments/7db893/audiophiles_please_come_in_about_aacsbc_codecs/

I found AAC from my iPhone to be on par with AptX HD from my Android when playing the same song. One benefit is when your files are already AAC that they will be transparently coded — meaning they are not loosing any quality from the re-encoding. As far as I understand AptX HD always requires re-encoding. Anyhow — maybe check out this thread: 

I think I have mentioned this in other threads. If using a 256 kbps AAC source file then the quality should be as good on an iPhone, my issue is if you want to use a non-AAC source file on an iPhone or a AAC source file with a higher bitrate than 256kbps (320 kbps or 512 for AAC FDK is possible)

https://www.head-fi.org/threads/iphone-aac-bluetooth-bottleneck-and-transcoding.879244/

https://vas3k.ru/365/2017-10-31/

It may be placebo but I am sure that Bluetooth audio on my iPhone X is not as good as on my S9+. I did some non-scientific tests at the weekend both using Spotify and also local files (FLAC converted to 320 kbps AAC and also 500 kbps OPUS) and for all cases the S9 sounded better. FYI the headphones tested are Sony WH10000xmk2, Wi1000x, WF1000x.

I do not think this is the case for all android phones, the V30 for example imo sounds lack lustre over Bluetooth even if it does support the same codecs.

I have been leaning towards switching back to iOS as my daily driver but knowing that the audio is just not as good is just stopping me right now  — https://www.head-fi.org/threads/iphone-aac-bluetooth-bottleneck-and-transcoding.879244/

——

https://audiophilesoft.ru/publ/theory/loudness_compensation/6-1-0-360

https://audiophilesoft.ru/publ/theory/aac_vs_mp3/6-1-0-16