PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
PAudioOut Class Reference

#include <PAudioOut.h>

Inheritance diagram for PAudioOut:
PDevice PlatformAudioOut PlatformAudioOut PlatformAudioOut PlatformAudioOut

Public Member Functions

 PAudioOut ()
 
 PAudioOut (const std::string &filename)
 
virtual ~PAudioOut ()
 
virtual bool LoadSoundFile (const std::string &filename)
 
virtual bool Play ()
 
virtual bool PlayForeground ()
 
virtual bool Stop ()
 
virtual bool SetPanning (const double left, const double right)
 
virtual bool Initialize ()
 
virtual bool CreateSineWave (float freq, long unsigned int length, long double volume)
 
virtual PEBL_DEVICE_TYPE GetDeviceType ()
 
- Public Member Functions inherited from PDevice
 PDevice ()
 The Standard constructor.
 
virtual ~PDevice ()
 The Standard destructor.
 
virtual int GetState (int iface) const
 

Protected Attributes

unsigned int mSampleRate
 
int mChannel
 
long double mAmplitudeLeft
 
long double mAmplitudeRight
 

Detailed Description

This defines a generic sound presentation interface. It has two basic modes: It can operate 'modally', where a sound file is played, blocking all other activity until complete; alternatively, it can be 'background', where the sound gets played by a callback in Loop(), which can be interrupted by the sound's end or something else like a time-out or an interruption.

Definition at line 39 of file PAudioOut.h.

Constructor & Destructor Documentation

◆ PAudioOut() [1/2]

PAudioOut::PAudioOut ( )

Definition at line 4 of file PAudioOut.cpp.

5{
6}

◆ PAudioOut() [2/2]

PAudioOut::PAudioOut ( const std::string &  filename)

Definition at line 9 of file PAudioOut.cpp.

10{
11}

◆ ~PAudioOut()

PAudioOut::~PAudioOut ( )
virtual

Definition at line 13 of file PAudioOut.cpp.

14{
15}

Member Function Documentation

◆ CreateSineWave()

virtual bool PAudioOut::CreateSineWave ( float  freq,
long unsigned int  length,
long double  volume 
)
inlinevirtual

Reimplemented in PlatformAudioOut.

Definition at line 70 of file PAudioOut.h.

70 {
71 float x = freq;
72 long unsigned int xx = length;
73 long double xxx =volume;return false;};

◆ GetDeviceType()

virtual PEBL_DEVICE_TYPE PAudioOut::GetDeviceType ( )
inlinevirtual

Reimplemented from PDevice.

Definition at line 77 of file PAudioOut.h.

77{return PDT_AUDIO_OUT;};
@ PDT_AUDIO_OUT
Definition PDevice.h:51

References PDT_AUDIO_OUT.

◆ Initialize()

virtual bool PAudioOut::Initialize ( )
inlinevirtual

Reimplemented in PlatformAudioOut, PlatformAudioOut, and PlatformAudioOut.

Definition at line 60 of file PAudioOut.h.

60{return false;};

◆ LoadSoundFile()

virtual bool PAudioOut::LoadSoundFile ( const std::string &  filename)
inlinevirtual

Reimplemented in PlatformAudioOut, and PlatformAudioOut.

Definition at line 47 of file PAudioOut.h.

47{return false;};

◆ Play()

virtual bool PAudioOut::Play ( )
inlinevirtual

Reimplemented in PlatformAudioOut, PlatformAudioOut, PlatformAudioOut, and PlatformAudioOut.

Definition at line 49 of file PAudioOut.h.

49{return false;};

◆ PlayForeground()

virtual bool PAudioOut::PlayForeground ( )
inlinevirtual

Reimplemented in PlatformAudioOut, PlatformAudioOut, and PlatformAudioOut.

Definition at line 50 of file PAudioOut.h.

50{return false;};

◆ SetPanning()

virtual bool PAudioOut::SetPanning ( const double  left,
const double  right 
)
inlinevirtual

Definition at line 52 of file PAudioOut.h.

52{return false;};

Referenced by PEBLObjects::SetPanning().

◆ Stop()

virtual bool PAudioOut::Stop ( )
inlinevirtual

Reimplemented in PlatformAudioOut, PlatformAudioOut, PlatformAudioOut, and PlatformAudioOut.

Definition at line 51 of file PAudioOut.h.

51{return false;};

Member Data Documentation

◆ mAmplitudeLeft

long double PAudioOut::mAmplitudeLeft
protected

Definition at line 84 of file PAudioOut.h.

◆ mAmplitudeRight

long double PAudioOut::mAmplitudeRight
protected

Definition at line 85 of file PAudioOut.h.

◆ mChannel

int PAudioOut::mChannel
protected

Definition at line 83 of file PAudioOut.h.

◆ mSampleRate

unsigned int PAudioOut::mSampleRate
protected

Definition at line 82 of file PAudioOut.h.


The documentation for this class was generated from the following files: