[ Previous | Next | Contents | Glossary | Home | Search ]
Ultimedia Services Version 2 for AIX: Programmer's Guide and Reference

UMSAudioDevice Object

The UMSAudioDevice object is a base class. Specific audio device implementations inherit their interface from this class. Ultimedia Services player objects and applications achieve device independence by accessing the audio device through the methods of the base class (without needing to know the base class object implementations).

A metaclass is provided with a method to construct a specific audio device based on an audio alias and data specified by you in the configuration file. This allows an application to be ported to a new audio device by altering the data under the audio alias in the configuration file. This is the preferred construction technique for applications. Alternatively, a specific audio device object can be constructed by the standard ObjectNameNew method.

To learn more about the UMSAudioDevice object, see:

For introductory information, see Audio Device Objects.

Enumeration Lists

To avoid name collision on defines, integer values have been captured as enumeration lists. The set of valid values from an enumerated list can vary with the application. The detailed method descriptions describe the valid or possible values for the specific use. The enumerated lists defined for this object follow.

enum ReturnCode {
   Success,
   Failure,
   InvalidParam,
   DeviceNotAvail,
   NoDevice,
   IncompatibleSettings,
   NotOpen,
   NotReady,
   SettingsChanged,
   MemoryError,
   UnderRun,
   OverRun,
   DeviceError,
   Interrupted,
   NotSupported,
   Preempted
   };
enum State {
   Notinitializationd,
   Stopped,
   Playing,
   Recording,
   Paused_Play,
   Paused_Record
   };

Type Definitions

UMSAudioDevice defines the following constant:

#define UMSAudioDevice_BlockingIO 0x00000001

Method Descriptions

ReturnCode close()

Description

This method closes the previously opened track.

Return Values

Success

Failure

ReturnCode enable_shared_notification (in long pid, in long signal)

Description

This method is only supported if the object is a shared audio device and the share mode is preempt_return. The method registers a signal with the shared server. If the device is preempted by another process, the application that enables notification waits for the registered signal before attempting to perform I/O methods. This saves the application from having to poll the device.

Arguments
in long pid A process ID. This is probably be the PID of the application making the notification request. This can be obtained by calling getpid.
in long signal An integer signal to use. The application must resister a signal handler for any signal selected. It is recommended to use signal 30, 31, 38 -> 59 for this purpose.
Return Values

Success

Failure

NotSupported

ReturnCode disable_shared_notification ()

Description

This method is only supported if the object is a shared audio device. The method clears the notification signal if it exists in the server.

Return Values

Success

Failure

NotSupported

ReturnCode get_audio_format_type(out string audio_format)

Description

The current format setting is returned as a string. If this request is issued after a set, but before an initialization method call, the value that are applied at initialization is returned.

Arguments
out string audio_format The string value representing the current audio setting.
Return Values

Success

Failure

Preempted

ReturnCode get_bits_per_sample(inout long bits)

Description

The current setting of bits_per_sample is returned. If this request is issued after a set, but before an initialization method call, the value that are applied at initialization is returned.

Arguments
inout long bits The current setting of bits_per_sample is returned. If this request is issued after a set, but before an initialization method call, the value that are applied at initialization is returned.
Return Values

Success

Failure

Preempted

DeviceNotAvail

ReturnCode get_sample_rate(inout long current_rate)

Description

The current sample rate in samples per second is returned. If this request is issued after a set, but before an initialization method call, the value that are applied at initialization is returned.

Arguments
inout long current_rate The current sample rate in samples per second. If this request is issued after a set, but before an initialization method call, the value that are applied at initialization is returned.
Return Values

Success

Failure

Preempted

DeviceNotAvail

ReturnCode get_state(inout State state)

Description

This method returns the current state of the audio device.

Arguments
inout State state The state is a value from the State enumeration list which can have values of Notinitializationd, Stopped, Playing, Recording, Paused_Play, or Paused_Record.
Return Values

Success

Failure

Preempted

DeviceNotAvail

ReturnCode initialize()

Description

This method initializes the audio device's audio parameters. This includes sample rate, bits per sample, connectors, audio format, number of channels, byte order, and number format. The current setting for these parameters are applied when the initialization method is called. The supported method of altering these parameters is to stop, play, or record; set the parameters; and initialize prior to starting a play or record. Results of attempting to alter parameters during play or record are indeterminate.

Return Values

Success

Failure

Preempted

ReturnCode open(in string device, in string mode, in long flags)

Description

This method opens an available track on the specified device. If an available track is not found then the method returns NotAvail. The modes currently defined are PLAY and RECORD. A UMSAudioDevice object permits only one open track even though the underlying real device can support multiple open tracks, concurrent plays, and records. Concurrent use of tracks within an application requires the use of multiple UMSAudioDevices.

Arguments
in string device Specifies the pathname of the device to open, such as /dev/acpa0.
in string mode Specifies the mode on the device being opened. Currently supported values are PLAY and RECORD.
in long flags This parameter allows for flags to be set on the open. At this time the only flag bit defined is UMSAudioDevice_BlockingIO 0x00000001. If this flag is not set, the underlying device is opened with the UNIX O_NDELAY flag set.
Return Values

Success

Failure

InvalidParam

MemoryError

DeviceNotAvail

NoDevice

ReturnCode pause()

Description

This method pauses the audio device. This is done as quickly as possible within the latency of the particular device. Play or record can be continued by the resume method.

Return Values

Success

Failure

Preempted

DeviceNotAvail

ReturnCode read(in UMSAudioTypes::Buffer buff, in long samples, inout long samples_read)

Description

This method attempts to read the specified number of audio samples from the audio device. The actual number of samples read is returned in the samples_read parameter. This method sample bounds the amount of data read so that incomplete samples cannot be read. The read can be terminated if opened without the UMSAudioDevice_BlockingIO flag, in which case the ReturnCode is set to Interrupted. The read can also terminate if the device is being shared and is preempted, in which case the ReturnCode is Preempted.

Arguments
in UMSAudioTypes::Buffer buff This is a sequence of octets used as a buffer that receives the audio data being read.
in long samples The number of samples to read specified by you.
inout long samples_read The actual number of samples returned.
Return Values

Success

Failure

Preempted

Interrupted

DeviceError

ReturnCode resume()

Description

This method resumes playing or recording of audio data when it has been paused.

Return Values

Success

Failure

Preempted

DeviceNotAvail

ReturnCode set_audio_format_type(in string fmt)

Description

This method sets the audio format to be used for play or record. Each specific audio device implementation advertises the formats that it supports as properties under its formats_alias in the configuration file. All devices are required to support PCM, A_LAW and MU_LAW. The setting takes effect at the next initialization.

Arguments
in string fmt A string specifying the desired audio format.
Return Values

Success

Failure

Preempted

DeviceNotAvail

ReturnCode set_number_of_channels(in long channels)

Description

This method sets the number of audio channels for play or record. Mono is specified with a value of 1 and stereo is specified with a value of 2. The setting takes effect on the next initialization.

Arguments
in long channels The number of channels for play or record. A value of 1 specifies mono, and a value of 2 specifies stereo.
Return Values

Success

Failure

Preempted

InvalidParam

ReturnCode set_bits_per_sample(in long bits)

Description

This method sets the number of bits per sample. The setting takes effect at the next initialization.

Arguments
in long bits The current sample rate in samples per second. If this request is issued after a set, but before an initialization method call, the value that are applied at initialization is returned.
Return Values

Success

Failure

Preempted

DeviceNotAvail

ReturnCode set_sample_rate(in long rate, inout long set_rate)

Description

This method sets the sample rate on the audio device. The rate parameter is the desired sample rate and the set_rate parameter is the actual sample rate that was set. Sample rates are set to the closest sample rate supported by the device. The setting takes affect at the next initialization.

Arguments
in long rate The requested sample rate in samples per second.
inout long set_rate The sample rate chosen by the device in response to the request.
Return Values

Success

Failure

Preempted

DeviceNotAvail

ReturnCode start()

Description

This method starts the processing of data in the audio device. For example, this method starts playing data that has been or are written to the device, or it starts recording.

Return Values

Success

Failure

Preempted

DeviceNotAvail

ReturnCode stop()

Description

This method stops the audio device. The difference between stop and pause is that pause preserves buffered data and can be resumed, while stop terminates play or record and discards buffered data.

Return Values

Success

Failure

Preempted

DeviceNotAvail

ReturnCode write(in UMSAudioTypes::Buffer buff, in long samples, inout long samples_written)

Description

This method attempts to write the specified number of samples to the audio device. The actual number of bytes written is returned in the samples_written parameter. This method sample bounds the amount of data written so that incomplete samples cannot be written. The write can be terminated if opened without the UMSAudioDevice_BlockingIO flag, in which case the ReturnCode is set to Interrupted. The write can also terminate if the device is being shared and is preempted, in which case the ReturnCode is preempted.

Arguments
in UMSAudioTypes::Buffer buff This is a sequence of octets used as a buffer which contains the audio data being written.
in long samples The number of samples to write specified by you.
inout long samples_written The actual number of samples written.
Return Values

Success

Failure

Preempted

Interrupted

DeviceError

ReturnCode get_number_of_channels(inout long channels)

Description

The current setting of number_of_channels is returned. If this request is issued after a set, but before an initialization method call, the value that are applied at initialization is returned.

Arguments
inout long channels The value of the current setting for number of channels.
Return Values

Success

Failure

Preempted

ReturnCode set_time_format(in UMSAudioTypes::TimeFormat time_format)

Description

This method sets the time format that are used by the object. This effects the time values that are used in the methods read_buff_size, write_buff_size, read_buff_remain, write_buff_remain, read_buff_used, write_buff_used, and get_position. The value takes effect immediately. The time format can have values of UMSAudioTime::Bytes, UMSAudioTime::Samples and UMSAudioTime::Msecs.

Arguments
in UMSAudioTypes::TimeFormat time_format The specified time format to use.
Return Values

Success

Failure

Preempted

InvalidParam

ReturnCode get_time_format(inout UMSAudioTypes::TimeFormat time_format)

Description

This method returns the current time format being used by the object.

Arguments
inout UMSAudioTypes::TimeFormat time_format The current time format to use.
Return Values

Success

Failure

Preempted

ReturnCode set_byte_order(in string byte_order)

Description

This method sets the byte order for the data played or captured. Values of MSB and LSB are supported. The setting takes effect at the next initialization.

Arguments
in string byte_order The desired byte order as a string value of MSB or LSB.
Return Values

Success

Failure

Preempted

InvalidParam

ReturnCode get_byte_order(out string byte_order)

Description

This method returns the byte order setting as a string value. If this request is issued after a set, but before an initialization method call, the value that are applied at initialization is returned.

Arguments
out string byte_order The byte order setting as a string value of MSB or LSB.
Return Values

Success

Failure

Preempted

ReturnCode set_number_format(in string number_format)

Description

This method sets the number format for the data played or captured. Values of SIGNED, UNSIGNED, and TWOS_COMPLEMENT can be supported by the specific object. The setting takes effect on the next initialization.

Arguments
in string number_format The desired number format as a string value.
Return Values

Success

Failure

Preempted

InvalidParam

ReturnCode get_number_format(out string number_format)

Description

This method returns the number format setting as a string value. If this request is issued after a set, but before an initialization method call, the value that are applied at initialization is returned.

Arguments
out string number_format The number format setting as a string value.
Return Values

Success

Failure

Preempted

ReturnCode enable_input(in string input, inout long left_gain, inout long right_gain)

Description

This method enables a given input connector and sets the left and right gain on the input if the device supports individual gain. This method can be called multiple times to enable several inputs. If the device does not support multiple inputs then the last valid input specified takes effect on the next initialization. The actual gain value used for each channel are returned in the associated parameter. The settings take effect on the next initialization. Specific devices advertise their input and output connection capability in the configuration file. The valid range of left_gain and right_gain is from 0 to 100. Zero indicating maintaining of current gain value; 100 meaning increasing to maximum gain value.

Arguments
in string input The string specifying the desired input.
inout long left_gain The desired gain value is passed in and the resulting gain is passed out.
inout long right_gain The desired gain value is passed in and the resulting gain is passed out.
Return Values

Success

Failure

Preempted

SettingsChanged

ReturnCode disable_input(in string input)

Description

This method disables a previously enabled input. The settings take effect on the next initialization.

Arguments
in string input The input connection to be disabled.
Return Values

Success

Failure

InvalidParam

Preempted

SettingsChanged

ReturnCode input_enabled(in string input, inout boolean enabled)

Description

This method returns a Boolean into the enabled parameter which states whether the input is currently enabled.

Arguments
in string input The input connection being queried.
inout boolean enabled returned as True if the input is enabled
Return Values

Success

Failure

Preempted

InvalidParam

ReturnCode enable_output(in string output, inout long left_gain, inout long right_gain)

Description

This method enables a given output connector and sets the left and right gain on the output if the device supports individual gain. This method can be called multiple times to enable several outputs. If the device does not support multiple inputs then the last valid output specified takes effect on the next initialization. The actual gain value used for each channel is returned in the associated parameter. The settings take effect on the next initialization. Specific devices advertise their input and output connection capability in the configuration file. (Note that left_gain and right_gain are not supported in this release.)

Arguments
in string output The string specifying the desired output.
inout long left_gain The desired gain value is passed in and the resulting gain is passed out.
inout long right_gain The desired gain value is passed in and the resulting gain is passed out.
Return Values

Success

Failure

InvalidParam

Preempted

SettingsChanged

ReturnCode disable_output(in string output)

Description

This method disables a previously enabled output. The settings take effect on the next initialization.

Arguments
in string output The output connection to be disabled.
Return Values

Success

Failure

Preempted

SettingsChanged

ReturnCode output_enabled(in string output, inout boolean enabled)

Description

This method returns a Boolean into the enabled parameter which states whether the output is currently enabled or not.

Arguments
in string output The output connection being queried.
inout boolean enabled Returned as True if the output is enabled.
Return Values

Success

Failure

Preempted

InvalidParam

ReturnCode set_monitor(in boolean monitor)

Description

This method enables or disables monitoring during a record. This setting takes effect immediately.

Arguments
in boolean monitor True to enable monitoring.
Return Values

Success

Failure

Preempted

ReturnCode get_monitor(inout boolean monitor)

Description

This method returns the current state of the monitoring flag in the monitor parameter. TRUE means monitoring is enabled, and FALSE means monitoring is disabled.

Arguments
inout boolean monitor True if monitoring is enabled.
Return Values

Success

Failure

Preempted

ReturnCode set_volume(in long volume)

Description

This method changes the volume. This setting takes effect immediately.

Arguments
in long volume The desired volume setting. Valid range is 0 through 100.
Return Values

Success

Failure

Preempted

InvalidParam

ReturnCode get_volume(inout long volume)

Description

This method returns the current volume level in the parameter volume.

Arguments
inout long volume The current value for volume is returned. The volume range is 0 through 100.
Return Values

Success

Failure

Preempted

ReturnCode set_balance(in long balance)

Description

This method sets the balance. Valid values are -100 to 100. -100 is full left and 100 is full right. 0 is balanced in the center. The new setting takes effect immediately.

Arguments
in long balance The desired balance value.
Return Values

Success

Failure

Preempted

InvalidParam

ReturnCode get_balance(inout long balance)

Description

This method returns the current balance setting in the parameter balance.

Arguments
inout long balance The current balance value.
Return Values

Success

Failure

Preempted

ReturnCode read_buff_size(inout long buff_size)

Description

This method returns the size of the read buffer for this device. The size is returned in units of the current time format: bytes, samples or milliseconds. Underrun and Overrun conditions are returned as ReturnCodes and the size of the read buffer is returned in the buff_size parameter. Knowledge of the read buffer size can help an application determine how frequently reads must be performed to prevent overruns.

Arguments
inout long buff_size The size of the read buffer.
Return Values

Success

Failure

DeviceError

UnderRun

OverRun

Preempt

ReturnCode write_buff_size(inout long buff_size)

Description

This method returns the size of the write buffer for this device. The size is returned in units of the current time format. Underrun and Overrun conditions are returned as ReturnCodes, and the size of the write buffer is returned in the buff_size parameter. Knowledge of the write buffer size can help an application determine how frequently writes must be performed to prevent underruns.

Arguments
inout long buff_size The size of the write buffer.
Return Values

Success

Failure

DeviceError

UnderRun

OverRun

Preempt

ReturnCode read_buff_remain(inout long remain)

Description

This method returns the amount of space available in the read buffer. The size is returned in units of the current time format. Underrun and Overrun conditions are returned as ReturnCodes and the amount of space remaining in the read buffer are returned in the remain parameter. This allows an application to observe how much data space remains.

Arguments
inout long remain The amount of buffer space that is unused is returned in units of the current time format.
Return Values

Success

Failure

DeviceError

UnderRun

OverRun

Preempt

ReturnCode write_buff_remain(inout long remain)

Description

This method returns the amount of space available in the write buffer. The size is returned in units of the current time format. Underrun and Overrun conditions are returned as ReturnCodes and the amount of space remaining in the write buffer is returned in the remain parameter. This allows an application to observe how much data can be written to the device without incurring a block.

Arguments

inout long remain

Return Values

Success

Failure

DeviceError

UnderRun

OverRun

Preempt

ReturnCode read_buff_used(inout long used)

Description

This method returns the amount of data in the read buffer. The amount of data in the buffer is returned in units of the current time format. Underrun and Overrun conditions are returned as ReturnCodes, and the amount of data in the read buffer is returned in the used parameter.

Arguments
inout long used The amount of data in the read buffer in units of the current time format.
Return Values

Success

Failure

DeviceError

UnderRun

OverRun

Preempt

ReturnCode write_buff_used(inout long used)

Description

This method returns the amount of data in the write buffer. The amount of data in the buffer is returned in units of the current time format. Underrun and Overrun conditions are returned as ReturnCodes, and the amount of data in the write buffer are returned in the used parameter. This is similar to the write_buff_remain method but queries the buffer in terms of how much data remains to play.

Arguments
inout long used The amount of data in the write buffer in units of the current time format.
Return Values

ReturnCode get_position(inout long position)

Description

This method returns the amount of data processed since the last start. The amount of data processed is returned in units of the current time format. Underrun and Overrun conditions are returned as ReturnCodes and the amount of data processed are returned in the position parameter.

Arguments
inout long position The elapsed audio time since the last play returned in units of the current time format.
Return Values

Success

Failure

DeviceError

UnderRun

OverRun

Preempt

ReturnCode play_remaining_data(in boolean block)

Description

This method forces the device to play the data remaining in the devices buffer. If there is not enough data in the device play buffer for the device to play, then this method pads the data in the play buffer so that it can be played. If the block parameter is TRUE, the method blocks until all of the remaining data has been played. This block is interruptible by a signal. It can also be preempted if the device is being shared.

Arguments
in boolean block Specifies whether the application desires to block on this method until play is complete.
Return Values

Success

Failure

DeviceError

UnderRun

OverRun

Preempt

ReturnCode save_state(out UMSAudioTypes::Buffer state_buff)

Description

This method saves the current settings of the device into a sequence and returns the sequence to the caller. This sequence can latter be used with the restore_state method to restore all of the settings to the device. The settings are returned in the sequence pointed to by the state_buff parameter. The caller is responsible for freeing the memory contained in the state_buff sequence. This is useful when constructing a shared device object from the device. The device state can be saved during preemption.

Arguments
out UMSAudioTypes::Buffer state_buff A sequence is returned that contains the data representing the device state.
Return Values

Success

Failure

Preempted

MemoryError

ReturnCode restore_state(in UMSAudioTypes::Buffer state_buff)

Description

This method restores all of the audio device's settings that were previously saved using the save_state method.

Arguments
in UMSAudioTypes::Buffer state_buff A sequence is supplied that contains the data representing the device state to be restored.
Return Values

Success

Failure

Preempted

InvalidParam

ReturnCode enable_audio_master_settings()

Description

This method presents device specific capabilities shared for all invocations of a device. If you enable master setting mode, you share in this configuration of the device. Each device can enforce rules based on current state and as to when the master_setting mode can be entered or exited. Some devices cannot support master setting, in which case a NotSupported ReturnCode is returned. Some methods on a device cannot be available on a device if they conflict with the master_setting mode; for example, the selection of input and output connections established via the master setting mode.

Return Values

Success

Failure

Preempted

NotSupported

ReturnCode disable_audio_master_settings()

Description

Devices supporting this method attempts to disable the master setting mode. If the method is not supported by the device a NotSupported value is returned. If the device cannot be acquired with master setting disabled, a value of Failure is returned.

Return Values

Success

Failure

Preempted

NotSupported

ReturnCode get_audio_device_pathname(out string device_pathname)

Description

This method returns a string which contains the full path of the device that this object is currently using, such as /dev/acpa0.

Arguments
out string device_pathname A string is returned containing the device pathname.
Return Values

Success

Failure

Preempted

ReturnCode get_audio_device_master_exec(out string exec_pathname)

Description

This method returns the path to an executable that, when executed, provides an interface that you can use to adjust the audio device's master settings. This is most likely a graphical user interface to the device specific master settings available for the device. This executable is advertised in the configuration file and therefore can be replaced by any executable desired.

Arguments
out string exec_pathname The pathname to the executable registered in the configuration file for the specific device is returned.
Return Values

Success

Failure

Preempted

NotSupported

ReturnCode set_play_share_mode(in string play_share_mode)

Description

This method provides a pragmatic interface to dynamically alter the shared mode for play. The default shared mode for play is statically specified for the audio alias in the configuration file. The only valid play share mode in this release is mix. The share mode has no effect unless a shared device is being used (requested in the configuration file for the alias). NotSupported is returned if the device is not a shared device.

Arguments
in string play_share_mode The requested play_share_mode.
Return Values

Success

Failure

Preempted

InvalidParm

NotSupported

ReturnCode set_record_share_mode(in string record_share_mode)

Description

This method provides a pragmatic interface to dynamically alter the shared mode for record. The default shared mode for record is statically specified for the audio alias in the configuration file. The valid record share modes in this release are preempt_block and preempt_return. A pre-empted read returns with a ReturnCode value of Preempted if the the mode is preempt_return versus blocking for mode preempt_block when the client is preempted waiting for the device. The shared mode has no effect unless a shared device is being used (requested in the configuration file for the alias). NotSupported is returned if the device is not a shared device.

Arguments
in string record_share_mode The requested record_share_mode.
Return Values

Success

Failure

Preempted

InvalidParm

NotSupported

ReturnCode get_play_share_mode(out string play_share_mode)

Description

This method returns the current play_share_mode. NotSupported is returned if the device is not a shared device.

Arguments
out string play_share_mode A string is returned that contains the current play_share_mode. NotSupported is returned if the device is not a shared device.
Return Values

Success

Failure

Preempted

NotSupported

ReturnCode get_record_share_mode(out string record_share_mode)

Description

This method returns the current record_share_mode. NotSupported is returned if the device is not a shared device.

Arguments
out string record_share_mode A string is returned that contains the current record_share_mode. NotSupported is returned if the device is not a shared device.

ReturnCode set_DMA_buffer_size(in long bytes, out long bytes_ret)

Description

This methods is only supported on devices that allow a variable DMA buffer size. The size of the DMA buffer must be 2048 or smaller. On other devices, the NotSupported code is returned. This method affects the audio latency by varying the amount of data that the device transfers in one DMA operation. For example, if the DMA buffer size is 2048 bytes and the application requests a read of 128 bytes, the device does not return control on a blocking input/output until 2048 bytes are actually read. If, in this example, the data rate is 8000 samples/sec, 8 bit samples, mono, there is approximately a 1/4 second delay every read. In this case, the method is used to lower this latency to an imperceptible amount (the tradeoff is a larger load on the processor). A separate DMA buffer exists for record and play, so you can use this method on any supported audio device object. The object iteself knows whether it is a record object or a play object. Any change takes effect on the next _initialize call.

Arguments
in long bytes The desired DMA buffer size in bytes. This parameter is device dependent.
out long bytes_ret The actual size that the DMA buffer is set to on the next inititalize.
Return Values

Success

InvalidParm

NotSupported

ReturnCode get_DMA_buffer_size(out long bytes)

Description

This method is only supported on devices that allow a variable DMA buffer size. On other devices, the NotSupported code is returned. This method returns the current value of the DMA buffer size for the given object on supported devices. If the object was opened for record, the record transfer size is returned. Otherwise, the play transfer size is returned.

Arguments
out long bytes The amount of bytes to which the buffer is set. This paramter is device dependent.
Return Values

Success

InvalidParm

NotSupported

ReturnCode set_audio_buffer_size(in long buffer_size, out long size_ret)

Description

This method is only supported on devices that allow a variable DMA buffer size. On other devices, the NotSupported code is returned. This method affects how much data is buffered for reads and writes in the kernel. This method helps to alleviate device overruns due to system performance when reading by allowing the buffer to fill; it also helps to alleviate device underruns due to system performace when writing by causing the buffer to drain. The size is given in the current time format, which is either Msecs, Bytes, or Samples. Separate buffers exist for read (record) and write (play) operations and there buffers can be different sizes. The call takes effect immediately, so you must issue it after the initialize. The device resets these values to the default whenever a new intitialize is performed, so the application must reissue the call whenever it issues an intitialize.

Arguments
in long buffer size The size of the audio buffer in the current time format.
out long size_ret The actual size to which the audio buffer was set.
Return Values

Success

InvalidParm

NotOpen

DeviceError

For introductory information, see Audio Device Objects.


[ Previous | Next | Contents | Glossary | Home | Search ]