mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 15:02:58 +02:00
- libraspi: some manual code nicenings
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -41,16 +41,17 @@ typedef enum
|
||||
class cAudio
|
||||
{
|
||||
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 */
|
||||
|
||||
AUDIO_FORMAT StreamType;
|
||||
AUDIO_SYNC_MODE SyncMode;
|
||||
AUDIO_FORMAT StreamType;
|
||||
AUDIO_SYNC_MODE SyncMode;
|
||||
bool started;
|
||||
bool thread_started;
|
||||
|
||||
@@ -67,35 +68,17 @@ class cAudio
|
||||
/* 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; };
|
||||
/* 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);
|
||||
|
Reference in New Issue
Block a user