mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
update audio streamtype
Origin commit data
------------------
Branch: master
Commit: 9f8040ce46
Author: redblue-pkt <redblue-pkt@orange.pl>
Date: 2018-10-04 (Thu, 04 Oct 2018)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -150,41 +150,36 @@ void cAudio::SetSyncMode(AVSYNC_TYPE Mode)
|
|||||||
ioctl(fd, AUDIO_SET_AV_SYNC, Mode);
|
ioctl(fd, AUDIO_SET_AV_SYNC, Mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define AUDIO_STREAMTYPE_AC3 0
|
|
||||||
#define AUDIO_STREAMTYPE_MPEG 1
|
|
||||||
#define AUDIO_STREAMTYPE_DTS 2
|
|
||||||
#define AUDIO_STREAMTYPE_AAC 8
|
|
||||||
#define AUDIO_STREAMTYPE_AACHE 9
|
|
||||||
|
|
||||||
void cAudio::SetStreamType(AUDIO_FORMAT type)
|
void cAudio::SetStreamType(AUDIO_FORMAT type)
|
||||||
{
|
{
|
||||||
int bypass = AUDIO_STREAMTYPE_MPEG;
|
const char *AF[] = {
|
||||||
lt_debug("%s %d\n", __FUNCTION__, type);
|
"AUDIO_STREAMTYPE_AC3",
|
||||||
StreamType = type;
|
"AUDIO_STREAMTYPE_MPEG",
|
||||||
|
"AUDIO_STREAMTYPE_DTS",
|
||||||
|
"AUDIO_STREAMTYPE_LPCM",
|
||||||
|
"AUDIO_STREAMTYPE_AAC",
|
||||||
|
"AUDIO_STREAMTYPE_AAC_HE",
|
||||||
|
"AUDIO_STREAMTYPE_MP3",
|
||||||
|
"AUDIO_STREAMTYPE_AAC_PLUS",
|
||||||
|
"AUDIO_STREAMTYPE_DTS_HD",
|
||||||
|
"AUDIO_STREAMTYPE_WMA",
|
||||||
|
"AUDIO_STREAMTYPE_WMA_PRO",
|
||||||
|
"AUDIO_STREAMTYPE_AC3_PLUS",
|
||||||
|
"AUDIO_STREAMTYPE_AMR",
|
||||||
|
"AUDIO_STREAMTYPE_RAW"
|
||||||
|
};
|
||||||
|
|
||||||
switch (type)
|
lt_info("%s - type=%s\n", __FUNCTION__, AF[type]);
|
||||||
|
|
||||||
|
if (ioctl(fd, AUDIO_SET_BYPASS_MODE, type) < 0)
|
||||||
{
|
{
|
||||||
case AUDIO_FMT_DD_PLUS:
|
perror("AUDIO_SET_BYPASS_MODE");
|
||||||
case AUDIO_FMT_DOLBY_DIGITAL:
|
return;
|
||||||
bypass = AUDIO_STREAMTYPE_AC3;
|
|
||||||
break;
|
|
||||||
case AUDIO_FMT_AAC:
|
|
||||||
bypass = AUDIO_STREAMTYPE_AAC;
|
|
||||||
break;
|
|
||||||
case AUDIO_FMT_AAC_PLUS:
|
|
||||||
bypass = AUDIO_STREAMTYPE_AACHE;
|
|
||||||
break;
|
|
||||||
case AUDIO_FMT_DTS:
|
|
||||||
bypass = AUDIO_STREAMTYPE_DTS;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Normaly the encoding should be set using AUDIO_SET_ENCODING
|
StreamType = type;
|
||||||
// But as we implemented the behavior to bypass (cause of e2) this is correct here
|
|
||||||
if (ioctl(fd, AUDIO_SET_BYPASS_MODE, bypass) < 0)
|
return;
|
||||||
lt_info("%s: AUDIO_SET_BYPASS_MODE failed (%m)\n", __func__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int cAudio::setChannel(int channel)
|
int cAudio::setChannel(int channel)
|
||||||
|
@@ -20,20 +20,21 @@ typedef enum {
|
|||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
AUDIO_FMT_AUTO = 0,
|
AUDIO_FMT_UNKNOWN = -1,
|
||||||
AUDIO_FMT_MPEG,
|
AUDIO_FMT_DOLBY_DIGITAL = 0,
|
||||||
AUDIO_FMT_MP3,
|
AUDIO_FMT_MPEG = 1,
|
||||||
AUDIO_FMT_DOLBY_DIGITAL,
|
AUDIO_FMT_DTS = 2,
|
||||||
AUDIO_FMT_BASIC = AUDIO_FMT_DOLBY_DIGITAL,
|
AUDIO_FMT_LPCM = 6,
|
||||||
AUDIO_FMT_AAC,
|
AUDIO_FMT_AAC = 8,
|
||||||
AUDIO_FMT_AAC_PLUS,
|
AUDIO_FMT_AAC_HE = 9,
|
||||||
AUDIO_FMT_DD_PLUS,
|
AUDIO_FMT_MP3 = 0xa,
|
||||||
AUDIO_FMT_DTS,
|
AUDIO_FMT_AAC_PLUS = 0xb,
|
||||||
AUDIO_FMT_AVS,
|
AUDIO_FMT_DTS_HD = 0x10,
|
||||||
AUDIO_FMT_MLP,
|
AUDIO_FMT_WMA = 0x20,
|
||||||
AUDIO_FMT_WMA,
|
AUDIO_FMT_WMA_PRO = 0x21,
|
||||||
AUDIO_FMT_MPG1, // TD only. For Movieplayer / cPlayback
|
AUDIO_FMT_DD_PLUS = 0x22,
|
||||||
AUDIO_FMT_ADVANCED = AUDIO_FMT_MLP
|
AUDIO_FMT_AMR = 0x23,
|
||||||
|
AUDIO_FMT_RAW = 0xf
|
||||||
} AUDIO_FORMAT;
|
} AUDIO_FORMAT;
|
||||||
|
|
||||||
class mixerVolume;
|
class mixerVolume;
|
||||||
|
Reference in New Issue
Block a user