summaryrefslogtreecommitdiff
path: root/audio.c
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2013-02-11 23:40:09 +0100
committerJohns <johns98@gmx.net>2013-02-11 23:40:09 +0100
commit54255e7b572acdf06f37affd2539d313656a780c (patch)
tree199d395efd4058378492aea6de327f23bcf92352 /audio.c
parent2cd667fb4435e5373b8ba2b6bb93144248aae231 (diff)
downloadvdr-plugin-softhddevice-54255e7b572acdf06f37affd2539d313656a780c.tar.gz
vdr-plugin-softhddevice-54255e7b572acdf06f37affd2539d313656a780c.tar.bz2
Try to use HBR (High Bit-Rate) for EAC3.
Diffstat (limited to 'audio.c')
-rw-r--r--audio.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/audio.c b/audio.c
index 369eec9..cc3869e 100644
--- a/audio.c
+++ b/audio.c
@@ -178,7 +178,7 @@ enum _audio_rates
//Audio88200, ///< 88.2Khz
//Audio96000, ///< 96.0Khz
//Audio176400, ///< 176.4Khz
- //Audio192000, ///< 192.0Khz
+ Audio192000, ///< 192.0Khz
AudioRatesMax ///< max index
};
@@ -190,7 +190,7 @@ static int AudioChannelMatrix[AudioRatesMax][9];
/// rates tables (must be sorted by frequency)
static const unsigned AudioRatesTable[AudioRatesMax] = {
- 44100, 48000,
+ 44100, 48000, 192000
};
//----------------------------------------------------------------------------
@@ -2794,6 +2794,7 @@ void AudioInit(void)
// Check which channels/rates/formats are supported
// FIXME: we force 44.1Khz and 48Khz must be supported equal
// FIXME: should use bitmap of channels supported in RatesInHw
+ // FIXME: use loop over sample-rates
freq = 44100;
AudioRatesInHw[Audio44100] = 0;
for (chan = 1; chan < 9; ++chan) {
@@ -2821,12 +2822,30 @@ void AudioInit(void)
tchan = chan;
tfreq = freq;
if (AudioUsedModule->Setup(&tfreq, &tchan, 0)) {
- AudioChannelsInHw[chan] = 0;
+ //AudioChannelsInHw[chan] = 0;
} else {
AudioChannelsInHw[chan] = chan;
AudioRatesInHw[Audio48000] |= (1 << chan);
}
}
+ freq = 192000;
+ AudioRatesInHw[Audio192000] = 0;
+ for (chan = 1; chan < 9; ++chan) {
+ int tchan;
+ int tfreq;
+
+ if (!AudioChannelsInHw[chan]) {
+ continue;
+ }
+ tchan = chan;
+ tfreq = freq;
+ if (AudioUsedModule->Setup(&tfreq, &tchan, 0)) {
+ //AudioChannelsInHw[chan] = 0;
+ } else {
+ AudioChannelsInHw[chan] = chan;
+ AudioRatesInHw[Audio192000] |= (1 << chan);
+ }
+ }
// build channel support and conversion table
for (u = 0; u < AudioRatesMax; ++u) {
for (chan = 1; chan < 9; ++chan) {