SoundService class documentation

Authors

Generated by builder

Contents -

  1. Software documentation for the SoundService class
  2. Software documentation for the MKSoundDevice protocol

Software documentation for the SoundService class

SoundService : NSObject

Declared in:
MKSoundDevice.h
Description forthcoming.
Method summary

defaultAudioDevice 

+ (Class) defaultAudioDevice;

Returns the default sound device for this platform.


Software documentation for the MKSoundDevice protocol

MKSoundDevice

Declared in:
MKSoundDevice.h
Conforms to:
NSObject
Description forthcoming.
Method summary

format 

- (int) format;

Returns the current format.


initForInput 

- (id) initForInput;

Initialises a device for input (i.e. as a microphone / line in).


initForOutput 

- (id) initForOutput;

Initialises a device for output (i.e. as a speaker / headphone).


leftVolume 

- (int) leftVolume;

Returns be volume of the left channel.


playSample: count: 

- (BOOL) playSample: (void*)bytes count: (int)count;

Plays a sample in an output device.


recordSample: count: 

- (BOOL) recordSample: (void*)bytes count: (int)count;

Records a sample from an input device. Returns true if the read succeeded.


reset 

- (void) reset;

Resets the device. The sample format, rate, and number of channels will return to their defaults and can once again be set.


rightVolume 

- (int) rightVolume;

Returns the volume of the right channel.


setChannels: 

- (int) setChannels: (int)channels;

Sets the number of channels to use on this device.

Note that this must be called before any calls setting the sampling rate and after any setting the sample format.


setFormat: 

- (int) setFormat: (int)format;

Sets the current sample format. See the OSS documentation for valid formats.

Note that this should be called before any calls setting the number of channels or the sample rate.


setRate: 

- (int) setRate: (int)rate;

Sets the sampling rate in Hertz.


setVolumeLeft: right: 

- (BOOL) setVolumeLeft: (int)left right: (int)right;

Sets the volume for the left and right channels. Valid values are from 0 to 100. Behaviour on other values is undefined.


sync 

- (void) sync;

Synchronises this thread with device state. Blocks until all data sent to the device has really been played.