hradio / timeshiftplayer-component Goto Github PK
View Code? Open in Web Editor NEWHRadio Android library project to timeshift radioservices
HRadio Android library project to timeshift radioservices
If i understood it correctly, the received stream gets decoded and reencoded before saving it.
Wouldn't it be better to save stream as it is (i.e. without any reencoding, but as it comes from DAB device)? in that case it saves CPU from additional processing (decoding/encoding), that can be important especially for older devices (with weak CPUs). E.g. in car headunits there are several apps running simultaneously with DAB receiver app in background, and so DAB receiver app won't get full CPU for decoding/encoding/decoding process.
Audio from AAC services with a single audio channel (mono) is scrambled and "micky-moused", which is testable in Germany with "hr-info".
The problem is in TimeshiftPlayerAacAu and its derived classes. They are using android.media.AudioFormat constants assigned to mAudioTrackChannelConfig.
However, this variable is then used with pcmAudioData in the respective AudioTrackSink class which expects the plain number of channels. Since the AudioFormat constants are flags with values unrelated to the number of channels, mono streams get 4 channels and stereo streams get 12. The latter seems to be working by chance, but the former does not.
Using instead a variable like mAudioTrackNumChannels with the plain number of channels (1 = mono, 2 = stereo) solves the problem. AudioFormat is not required anywhere.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.