|
MythTV
0.27pre
|
Implements Core Audio (Mac OS X Hardware Abstraction Layer) output. More...
#include <audiooutputca.h>


Public Member Functions | |
| AudioOutputCA (const AudioSettings &settings) | |
| virtual | ~AudioOutputCA () |
| AudioOutputSettings * | GetOutputSettings (bool digital) |
| virtual int64_t | GetAudiotime (void) |
| Reimplement the base class's version of GetAudiotime() so that we don't use gettimeofday or Qt mutexes. | |
| bool | RenderAudio (unsigned char *aubuf, int size, unsigned long long timestamp) |
| Object-oriented part of callback. | |
| virtual int | GetVolumeChannel (int channel) const |
| virtual void | SetVolumeChannel (int channel, int volume) |
| void | Debug (QString msg) |
| void | Error (QString msg) |
| void | Warn (QString msg) |
Public Member Functions inherited from AudioOutputBase | |
| const char * | quality_string (int q) |
| AudioOutputBase (const AudioSettings &settings) | |
| virtual | ~AudioOutputBase () |
| Destructor. | |
| AudioOutputSettings * | GetOutputSettingsCleaned (bool digital=true) |
| Returns capabilities supported by the audio device amended to take into account the digital audio options (AC3, DTS, E-AC3 and TrueHD) | |
| AudioOutputSettings * | GetOutputSettingsUsers (bool digital=false) |
| Returns capabilities supported by the audio device amended to take into account the digital audio options (AC3, DTS, E-AC3 and TrueHD) as well as the user settings. | |
| virtual void | Reconfigure (const AudioSettings &settings) |
| (Re)Configure AudioOutputBase | |
| virtual void | SetEffDsp (int dsprate) |
| Set the effective DSP rate. | |
| virtual void | SetStretchFactor (float factor) |
| Set the timestretch factor. | |
| virtual float | GetStretchFactor (void) const |
| Get the timetretch factor. | |
| virtual int | GetChannels (void) const |
| virtual AudioFormat | GetFormat (void) const |
| virtual int | GetBytesPerFrame (void) const |
| virtual bool | CanPassthrough (int samplerate, int channels, int codec, int profile) const |
| Test if we can output digital audio and if sample rate is supported. | |
| virtual bool | CanDownmix (void) const |
| virtual bool | IsUpmixing (void) |
| Source is currently being upmixed. | |
| virtual bool | ToggleUpmix (void) |
| Toggle between stereo and upmixed 5.1 if the source material is stereo. | |
| virtual bool | CanUpmix (void) |
| Upmixing of the current source is available if requested. | |
| virtual void | Reset (void) |
| Reset the audiobuffer, timecode and mythmusic visualisation. | |
| void | SetSWVolume (int new_volume, bool save) |
| Set the volume for software volume control. | |
| int | GetSWVolume (void) |
| Get the volume for software volume control. | |
| virtual bool | AddFrames (void *buffer, int frames, int64_t timecode) |
| Add frames to the audiobuffer and perform any required processing. | |
| virtual bool | AddData (void *buffer, int len, int64_t timecode, int frames) |
| Add data to the audiobuffer and perform any required processing. | |
| virtual bool | NeedDecodingBeforePassthrough () const |
| NeedDecodingBeforePassthrough: returns true if AudioOutput class can determine the length in millisecond of native audio frames bitstreamed passed to AddData. | |
| virtual int64_t | LengthLastData (void) const |
| LengthLastData: returns the length of the last data added in millisecond. | |
| virtual void | SetTimecode (int64_t timecode) |
| Set the timecode of the samples most recently added to the audiobuffer. | |
| virtual bool | IsPaused (void) const |
| virtual void | Pause (bool paused) |
| void | PauseUntilBuffered (void) |
| virtual void | Drain (void) |
| Block until all available frames have been written to the device. | |
| virtual int64_t | GetAudioBufferedTime (void) |
| Get the difference in timecode between the samples that are about to become audible and the samples most recently added to the audiobuffer, i.e. | |
| virtual void | Status (void) |
| Report status via an OutputEvent. | |
| virtual void | SetSourceBitrate (int rate) |
| Set the bitrate of the source material, reported in periodic OutputEvents. | |
| virtual void | GetBufferStatus (uint &fill, uint &total) |
| Fill in the number of bytes in the audiobuffer and the total size of the audiobuffer. | |
| virtual void | bufferOutputData (bool y) |
| virtual int | readOutputData (unsigned char *read_buffer, int max_length) |
Public Member Functions inherited from AudioOutput | |
| AudioOutput () | |
| virtual | ~AudioOutput () |
| QString | GetError (void) const |
| QString | GetWarning (void) const |
| bool | PulseStatus (void) |
Public Member Functions inherited from VolumeBase | |
| VolumeBase () | |
| virtual | ~VolumeBase () |
| void | SWVolume (bool set) |
| bool | SWVolume (void) const |
| virtual uint | GetCurrentVolume (void) const |
| virtual void | SetCurrentVolume (int value) |
| virtual void | AdjustCurrentVolume (int change) |
| virtual void | ToggleMute (void) |
| virtual MuteState | GetMuteState (void) const |
| virtual MuteState | SetMuteState (MuteState) |
Public Member Functions inherited from OutputListeners | |
| OutputListeners () | |
| virtual | ~OutputListeners () |
| bool | hasVisual (void) |
| void | addVisual (MythTV::Visual *) |
| void | removeVisual (MythTV::Visual *) |
| QMutex * | mutex () |
| void | setBufferSize (unsigned int sz) |
| unsigned int | bufferSize () const |
Public Member Functions inherited from MythObservable | |
| MythObservable () | |
| virtual | ~MythObservable () |
| void | addListener (QObject *listener) |
| Add a listener to the observable. | |
| void | removeListener (QObject *listener) |
| Remove a listener to the observable. | |
| void | dispatch (const MythEvent &event) |
| Dispatch an event to all listeners. | |
| void | dispatchNow (const MythEvent &event) |
| Dispatch an event to all listeners. | |
| bool | hasListeners (void) |
Public Member Functions inherited from MThread | |
| MThread (const QString &objectName) | |
| Standard constructor. | |
| MThread (const QString &objectName, QRunnable *runnable) | |
| Use this constructor if you want the default run() method to run the QRunnable's run() method instead of entering the Qt event loop. | |
| virtual | ~MThread () |
| void | RunProlog (void) |
| Sets up a thread, call this if you reimplement run(). | |
| void | RunEpilog (void) |
| Cleans up a thread's resources, call this if you reimplement run(). | |
| QThread * | qthread (void) |
| Returns the thread, this will always return the same pointer no matter how often you restart the thread. | |
| void | setObjectName (const QString &name) |
| QString | objectName (void) const |
| void | setPriority (QThread::Priority priority) |
| QThread::Priority | priority (void) const |
| bool | isFinished (void) const |
| bool | isRunning (void) const |
| void | setStackSize (uint stackSize) |
| uint | stackSize (void) const |
| void | exit (int retcode=0) |
| Use this to exit from the thread if you are using a Qt event loop. | |
| void | start (QThread::Priority=QThread::InheritPriority) |
| Tell MThread to start running the thread in the near future. | |
| void | terminate (void) |
| Kill a thread unsafely. | |
| void | quit (void) |
| calls exit(0) | |
| bool | wait (unsigned long time=ULONG_MAX) |
| Wait for the MThread to exit, with a maximum timeout. | |
Static Public Member Functions | |
| static QMap< QString, QString > * | GetDevices (const char *type=NULL) |
Protected Member Functions | |
| virtual bool | OpenDevice (void) |
| virtual void | CloseDevice (void) |
| virtual void | WriteAudio (unsigned char *aubuf, int size) |
| virtual int | GetBufferedOnSoundcard (void) const |
| Return the size in bytes of frames currently in the audio buffer adjusted with the audio playback latency. | |
| virtual bool | StartOutputThread (void) |
| virtual void | StopOutputThread (void) |
Protected Member Functions inherited from AudioOutputBase | |
| void | InitSettings (const AudioSettings &settings) |
| virtual void | WriteAudio (uchar *aubuf, int size)=0 |
| void | KillAudio (void) |
| Kill the output thread and cleanup. | |
| int | GetAudioData (uchar *buffer, int buf_size, bool fill_buffer, volatile uint *local_raud=NULL) |
| Copy frames from the audiobuffer into the buffer provided. | |
| void | OutputAudioLoop (void) |
| Run in the output thread, write frames to the output device as they become available and there's space in the device buffer to write them. | |
| virtual void | run () |
| Main routine for the output thread. | |
| int | CheckFreeSpace (int &frames) |
| Check that there's enough space in the audiobuffer to write the provided number of frames. | |
| int | audiolen () |
| Get the number of bytes in the audiobuffer. | |
| int | audiofree () |
| Get the free space in the audiobuffer in bytes. | |
| int | audioready () |
| Get the scaled number of bytes in the audiobuffer, i.e. | |
| void | SetStretchFactorLocked (float factor) |
| Set the timestretch factor. | |
| int | GetBaseAudBufTimeCode () const |
Protected Member Functions inherited from AudioOutput | |
| void | Error (const QString &msg) |
| void | SilentError (const QString &msg) |
| void | Warn (const QString &msg) |
| void | ClearError (void) |
| void | ClearWarning (void) |
Protected Member Functions inherited from VolumeBase | |
| void | UpdateVolume (void) |
| void | SyncVolume (void) |
| void | SetChannels (int new_channels) |
Protected Member Functions inherited from OutputListeners | |
| void | error (const QString &e) |
| void | dispatchVisual (uchar *b, unsigned long b_len, unsigned long written, int chan, int prec) |
| void | prepareVisuals () |
Protected Member Functions inherited from MThread | |
| int | exec (void) |
| Enters the qt event loop. call exit or quit to exit thread. | |
Private Attributes | |
| CoreAudioData * | d |
| int | bufferedBytes |
| long | CA_audiotime_updated |
Friends | |
| class | CoreAudioData |
Implements Core Audio (Mac OS X Hardware Abstraction Layer) output.
Definition at line 15 of file audiooutputca.h.
| AudioOutputCA::AudioOutputCA | ( | const AudioSettings & | settings | ) |
Definition at line 175 of file audiooutputca.cpp.
|
virtual |
Definition at line 187 of file audiooutputca.cpp.
|
virtual |
Reimplemented from AudioOutputBase.
Definition at line 194 of file audiooutputca.cpp.
|
static |
Definition at line 1693 of file audiooutputca.cpp.
Referenced by AudioOutput::GetOutputList().
|
virtual |
Reimplement the base class's version of GetAudiotime() so that we don't use gettimeofday or Qt mutexes.
Reimplemented from AudioOutputBase.
Definition at line 400 of file audiooutputca.cpp.
Object-oriented part of callback.
Definition at line 346 of file audiooutputca.cpp.
Referenced by RenderCallbackAnalog(), and RenderCallbackSPDIF().
Implements VolumeBase.
Definition at line 438 of file audiooutputca.cpp.
Implements VolumeBase.
Definition at line 452 of file audiooutputca.cpp.
|
inline |
Definition at line 35 of file audiooutputca.h.
Referenced by GetOutputSettings(), and OpenDevice().
|
inline |
Definition at line 38 of file audiooutputca.h.
Referenced by OpenDevice().
|
inline |
Definition at line 41 of file audiooutputca.h.
Implements AudioOutputBase.
Definition at line 257 of file audiooutputca.cpp.
Implements AudioOutputBase.
Definition at line 306 of file audiooutputca.cpp.
Definition at line 385 of file audiooutputca.cpp.
Return the size in bytes of frames currently in the audio buffer adjusted with the audio playback latency.
Implements AudioOutputBase.
Definition at line 392 of file audiooutputca.cpp.
Referenced by GetAudiotime().
Reimplemented from AudioOutputBase.
Definition at line 52 of file audiooutputca.h.
Reimplemented from AudioOutputBase.
Definition at line 53 of file audiooutputca.h.
|
friend |
Definition at line 58 of file audiooutputca.h.
Referenced by AudioOutputCA().
|
private |
Definition at line 57 of file audiooutputca.h.
Referenced by AudioOutputCA(), CloseDevice(), GetOutputSettings(), GetVolumeChannel(), OpenDevice(), SetVolumeChannel(), and ~AudioOutputCA().
|
private |
Definition at line 60 of file audiooutputca.h.
Referenced by GetBufferedOnSoundcard(), and RenderAudio().
|
private |
Definition at line 61 of file audiooutputca.h.
1.8.1.2