Files
Android-247-Radio/app
cottongin 7795904d93 fix: detect actual stream format instead of hardcoding 44100 Hz stereo
AudioEngine previously hardcoded 44100 Hz stereo for AudioTrack and
MediaCodec, causing streams at other sample rates (22050, 48000, etc.)
to play at wrong speed and mono streams to be misinterpreted.

Now defers AudioTrack/MediaCodec creation until the first MP3 frame
arrives, reads the actual sample rate and channel mode from the frame
header, and configures output accordingly. Timing constants (frame
duration, frames-per-second) are computed dynamically. Adds
INFO_OUTPUT_FORMAT_CHANGED handling as a safety net and surfaces
detected format (e.g. "44.1 kHz Stereo") in the Now Playing UI.

Made-with: Cursor
2026-04-27 04:28:14 -04:00
..