mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Fix last commit.
This commit is contained in:
parent
90538ebfa9
commit
5207af6b2d
37
audio.c
37
audio.c
@ -1,7 +1,7 @@
|
|||||||
///
|
///
|
||||||
/// @file audio.c @brief Audio module
|
/// @file audio.c @brief Audio module
|
||||||
///
|
///
|
||||||
/// Copyright (c) 2009 - 2013 by Johns. All Rights Reserved.
|
/// Copyright (c) 2009 - 2014 by Johns. All Rights Reserved.
|
||||||
///
|
///
|
||||||
/// Contributor(s):
|
/// Contributor(s):
|
||||||
///
|
///
|
||||||
@ -132,6 +132,7 @@ static const char *AudioModuleName; ///< which audio module to use
|
|||||||
static const AudioModule *AudioUsedModule = &NoopModule;
|
static const AudioModule *AudioUsedModule = &NoopModule;
|
||||||
static const char *AudioPCMDevice; ///< PCM device name
|
static const char *AudioPCMDevice; ///< PCM device name
|
||||||
static const char *AudioPassthroughDevice; ///< Passthrough device name
|
static const char *AudioPassthroughDevice; ///< Passthrough device name
|
||||||
|
static char AudioAppendAES; ///< flag automatic append AES
|
||||||
static const char *AudioMixerDevice; ///< mixer device name
|
static const char *AudioMixerDevice; ///< mixer device name
|
||||||
static const char *AudioMixerChannel; ///< mixer channel name
|
static const char *AudioMixerChannel; ///< mixer channel name
|
||||||
static char AudioDoingInit; ///> flag in init, reduce error
|
static char AudioDoingInit; ///> flag in init, reduce error
|
||||||
@ -1007,6 +1008,26 @@ static snd_pcm_t *AlsaOpenPCM(int passthrough)
|
|||||||
Info(_("audio/alsa: using %sdevice '%s'\n"),
|
Info(_("audio/alsa: using %sdevice '%s'\n"),
|
||||||
passthrough ? "pass-through " : "", device);
|
passthrough ? "pass-through " : "", device);
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
// for AC3 pass-through try to set the non-audio bit, use AES0=6
|
||||||
|
//
|
||||||
|
if (passthrough && AudioAppendAES) {
|
||||||
|
#if 0
|
||||||
|
// FIXME: not yet finished
|
||||||
|
char *buf;
|
||||||
|
const char *s;
|
||||||
|
int n;
|
||||||
|
|
||||||
|
n = strlen(device);
|
||||||
|
buf = alloca(n + sizeof(":AES0=6") + 1);
|
||||||
|
strcpy(buf, device);
|
||||||
|
if (!(s = strchr(buf, ':'))) {
|
||||||
|
// no alsa parameters
|
||||||
|
strcpy(buf + n, ":AES=6");
|
||||||
|
}
|
||||||
|
Debug(3, "audio/alsa: try '%s'\n", buf);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
// open none blocking; if device is already used, we don't want wait
|
// open none blocking; if device is already used, we don't want wait
|
||||||
if ((err =
|
if ((err =
|
||||||
snd_pcm_open(&handle, device, SND_PCM_STREAM_PLAYBACK,
|
snd_pcm_open(&handle, device, SND_PCM_STREAM_PLAYBACK,
|
||||||
@ -2780,6 +2801,20 @@ void AudioSetChannel(const char *channel)
|
|||||||
AudioMixerChannel = channel;
|
AudioMixerChannel = channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
** Set automatic AES flag handling.
|
||||||
|
**
|
||||||
|
** @param onoff turn setting AES flag on or off
|
||||||
|
*/
|
||||||
|
void AudioSetAutoAES(int onoff)
|
||||||
|
{
|
||||||
|
if (onoff < 0) {
|
||||||
|
AudioAppendAES ^= 1;
|
||||||
|
} else {
|
||||||
|
AudioAppendAES = onoff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
** Initialize audio output module.
|
** Initialize audio output module.
|
||||||
**
|
**
|
||||||
|
3
audio.h
3
audio.h
@ -1,7 +1,7 @@
|
|||||||
///
|
///
|
||||||
/// @file audio.h @brief Audio module headerfile
|
/// @file audio.h @brief Audio module headerfile
|
||||||
///
|
///
|
||||||
/// Copyright (c) 2009 - 2013 by Johns. All Rights Reserved.
|
/// Copyright (c) 2009 - 2014 by Johns. All Rights Reserved.
|
||||||
///
|
///
|
||||||
/// Contributor(s):
|
/// Contributor(s):
|
||||||
///
|
///
|
||||||
@ -52,6 +52,7 @@ extern void AudioSetDevice(const char *); ///< set PCM audio device
|
|||||||
/// set pass-through device
|
/// set pass-through device
|
||||||
extern void AudioSetPassthroughDevice(const char *);
|
extern void AudioSetPassthroughDevice(const char *);
|
||||||
extern void AudioSetChannel(const char *); ///< set mixer channel
|
extern void AudioSetChannel(const char *); ///< set mixer channel
|
||||||
|
extern void AudioSetAutoAES(int); ///< set automatic AES flag handling
|
||||||
extern void AudioInit(void); ///< setup audio module
|
extern void AudioInit(void); ///< setup audio module
|
||||||
extern void AudioExit(void); ///< cleanup and exit audio module
|
extern void AudioExit(void); ///< cleanup and exit audio module
|
||||||
|
|
||||||
|
@ -607,7 +607,7 @@ msgid " E-AC-3 pass-through"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Enable (E-)AC-3 (decoder) downmix"
|
msgid "Enable (E-)AC-3 (decoder) downmix"
|
||||||
msgstr "Aktiviere (E-)AC-3 (decoder) downmix""
|
msgstr "Aktiviere (E-)AC-3 (decoder) downmix"
|
||||||
|
|
||||||
msgid "Volume control"
|
msgid "Volume control"
|
||||||
msgstr "Lautstärkesteuerung"
|
msgstr "Lautstärkesteuerung"
|
||||||
|
Loading…
Reference in New Issue
Block a user