mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
- libgeneric: some manual code nicenings
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -42,16 +42,17 @@ typedef enum
|
||||
class cAudio : public OpenThreads::Thread
|
||||
{
|
||||
friend class cPlayback;
|
||||
|
||||
private:
|
||||
int fd;
|
||||
bool Muted;
|
||||
|
||||
int clipfd; /* for pcm playback */
|
||||
int mixer_fd; /* if we are using the OSS mixer */
|
||||
int mixer_fd; /* if we are using the OSS mixer */
|
||||
int mixer_num; /* oss mixer to use, if any */
|
||||
|
||||
int StreamType;
|
||||
AUDIO_SYNC_MODE SyncMode;
|
||||
AUDIO_SYNC_MODE SyncMode;
|
||||
bool started;
|
||||
bool thread_started;
|
||||
|
||||
@@ -69,51 +70,27 @@ class cAudio : public OpenThreads::Thread
|
||||
/* construct & destruct */
|
||||
cAudio(void *, void *, void *);
|
||||
~cAudio(void);
|
||||
int64_t getPts()
|
||||
{
|
||||
return curr_pts;
|
||||
}
|
||||
int64_t getPts() { return curr_pts; }
|
||||
|
||||
void *GetHandle()
|
||||
{
|
||||
return NULL;
|
||||
};
|
||||
void *GetHandle() { return NULL; };
|
||||
|
||||
void setAVInput(int /*val*/)
|
||||
{
|
||||
return;
|
||||
};
|
||||
void setAVInput(int /*val*/) { return; };
|
||||
|
||||
/* shut up */
|
||||
int mute(bool remember = true)
|
||||
{
|
||||
return do_mute(true, remember);
|
||||
};
|
||||
int unmute(bool remember = true)
|
||||
{
|
||||
return do_mute(false, remember);
|
||||
};
|
||||
int mute(bool remember = true) { return do_mute(true, remember); };
|
||||
int unmute(bool remember = true) { return do_mute(false, remember); };
|
||||
|
||||
/* volume, min = 0, max = 255 */
|
||||
int setVolume(unsigned int left, unsigned int right);
|
||||
int getVolume(void)
|
||||
{
|
||||
return volume;
|
||||
}
|
||||
bool getMuteStatus(void)
|
||||
{
|
||||
return Muted;
|
||||
};
|
||||
int getVolume(void) { return volume; }
|
||||
bool getMuteStatus(void) { return Muted; };
|
||||
|
||||
/* start and stop audio */
|
||||
int Start(void);
|
||||
int Stop(void);
|
||||
bool Pause(bool Pcm = true);
|
||||
void SetStreamType(int bypass);
|
||||
int GetStreamType(void)
|
||||
{
|
||||
return StreamType;
|
||||
}
|
||||
int GetStreamType(void) { return StreamType; }
|
||||
void SetSyncMode(AVSYNC_TYPE Mode);
|
||||
|
||||
/* select channels */
|
||||
|
Reference in New Issue
Block a user