Ags.Soundcard¶
- Implementations:
None
Methods¶
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
None
Signals¶
Name |
Short Description |
|---|---|
The |
|
The |
|
The |
Fields¶
None
Class Details¶
- class Ags.Soundcard¶
- Bases:
- Structure:
- classmethod helper_config_get_buffer_size(config)¶
- Parameters:
config (
Ags.Config) – theAgs.Config- Returns:
the buffer size
- Return type:
Get buffer size.
Added in version 3.0.0.
- classmethod helper_config_get_cache_buffer_size(config)¶
- Parameters:
config (
Ags.Config) – theAgs.Config- Returns:
the cache buffer size
- Return type:
Get cache buffer size.
Added in version 6.10.4.
- classmethod helper_config_get_dsp_channels(config)¶
- Parameters:
config (
Ags.Config) – theAgs.Config- Returns:
the count of dsp channels
- Return type:
Get dsp channels count.
Added in version 3.0.0.
- classmethod helper_config_get_format(config)¶
- Parameters:
config (
Ags.Config) – theAgs.Config- Returns:
the format
- Return type:
Get format as
Ags.SoundcardFormat-enum.Added in version 3.0.0.
- classmethod helper_config_get_pcm_channels(config)¶
- Parameters:
config (
Ags.Config) – theAgs.Config- Returns:
the count of pcm channels
- Return type:
Get pcm channels count.
Added in version 3.0.0.
- classmethod helper_config_get_samplerate(config)¶
- Parameters:
config (
Ags.Config) – theAgs.Config- Returns:
the samplerate
- Return type:
Get samplerate.
Added in version 3.0.0.
- classmethod helper_config_get_use_cache(config)¶
- Parameters:
config (
Ags.Config) – theAgs.Config- Returns:
- Return type:
Get use cache.
Added in version 6.10.4.
- get_buffer()¶
-
Get current playback buffer.
Added in version 3.0.0.
- get_capability()¶
- Returns:
the capablities flags
- Return type:
Retrieve
Ags.SoundcardCapability-enum information.Added in version 3.0.0.
- get_next_buffer()¶
-
Get future playback buffer.
Added in version 3.0.0.
- get_presets()¶
- Returns:
- channels:
the audio channels
- rate:
the samplerate
- buffer_size:
the buffer size
- format:
the format
- Return type:
(channels:
int, rate:int, buffer_size:int, format:Ags.SoundcardFormat)
Get presets.
Added in version 3.0.0.
- get_prev_buffer()¶
-
Get future playback buffer.
Added in version 3.0.0.
- get_start_note_offset()¶
- Returns:
start note offset
- Return type:
Get current playback start note offset.
Added in version 9.0.0.
- get_sub_block_count()¶
- Returns:
the sub block count
- Return type:
Get sub block count.
Added in version 3.0.0.
- get_uptime()¶
- Returns:
playback time as string
- Return type:
Get playback time as string.
Added in version 3.0.0.
- is_available()¶
-
Get available.
Added in version 3.0.0.
- is_playing()¶
-
Get playing.
Added in version 3.0.0.
- is_recording()¶
-
Get recording.
Added in version 3.0.0.
- is_starting()¶
-
Get starting.
Added in version 3.0.0.
- list_cards()¶
- Returns:
- card_id:
a list containing card ids
- card_name:
a list containing card names
- Return type:
Retrieve card_id and card_name as a list of strings.
Added in version 3.0.0.
- lock_buffer(buffer)¶
-
Lock buffer.
Added in version 3.0.0.
- offset_changed(note_offset)¶
- Parameters:
note_offset (
int) – the current note offset
Callback when counter expires minor note offset.
Added in version 3.0.0.
- pcm_info(card_id)¶
- Parameters:
card_id (
str) – the selected soundcard by its string identifier- Raises:
- Returns:
- channels_min:
min channels supported
- channels_max:
max channels supported
- rate_min:
min samplerate supported
- rate_max:
max samplerate supported
- buffer_size_min:
min buffer size supported by soundcard
- buffer_size_max:
max buffer size supported by soundcard
- Return type:
(channels_min:
int, channels_max:int, rate_min:int, rate_max:int, buffer_size_min:int, buffer_size_max:int)
Retrieve detailed information of card_id soundcard.
Added in version 3.0.0.
- play()¶
- Raises:
Plays the current buffer of soundcard.
Added in version 3.0.0.
- play_init()¶
- Raises:
Initializes the soundcard for playback.
Added in version 3.0.0.
- record()¶
- Raises:
Records the current buffer of soundcard.
Added in version 3.0.0.
- record_init()¶
- Raises:
Initializes the soundcard for recordback.
Added in version 3.0.0.
- set_bpm(bpm)¶
- Parameters:
bpm (
float) – the bpm to set
Set current playback bpm.
Added in version 3.0.0.
- set_device(card_id)¶
- Parameters:
card_id (
str) – the device to set
Set device.
Added in version 3.0.0.
- set_presets(channels, rate, buffer_size, format)¶
- Parameters:
channels (
int) – the audio channelsrate (
int) – the sampleratebuffer_size (
int) – the buffer sizeformat (
Ags.SoundcardFormat) – the format
Set presets.
Added in version 3.0.0.
- set_start_note_offset(start_note_offset)¶
- Parameters:
start_note_offset (
int) – the start note offset to set
Set current playback start note offset.
Added in version 9.0.0.
- stop()¶
Stops the soundcard from playing to it.
Added in version 3.0.0.
- tic()¶
Every call to play may generate a tic.
Added in version 3.0.0.
- trylock_sub_block(buffer, sub_block)¶
- Parameters:
- Returns:
- Return type:
Trylock sub block.
Added in version 3.0.0.
- unlock_buffer(buffer)¶
-
Unlock buffer.
Added in version 3.0.0.
- unlock_sub_block(buffer, sub_block)¶
-
Unlock sub block.
Added in version 3.0.0.
- do_get_bpm() virtual¶
- Returns:
bpm
- Return type:
Get current playback bpm.
Added in version 3.0.0.
- do_get_buffer() virtual¶
-
Get current playback buffer.
Added in version 3.0.0.
- do_get_capability() virtual¶
- Returns:
the capablities flags
- Return type:
Retrieve
Ags.SoundcardCapability-enum information.Added in version 3.0.0.
- do_get_device() virtual¶
- Returns:
the device’s identifier
- Return type:
Get device.
Added in version 3.0.0.
- do_get_next_buffer() virtual¶
-
Get future playback buffer.
Added in version 3.0.0.
- do_get_presets() virtual¶
- Returns:
- channels:
the audio channels
- rate:
the samplerate
- buffer_size:
the buffer size
- format:
the format
- Return type:
(channels:
int, rate:int, buffer_size:int, format:Ags.SoundcardFormat)
Get presets.
Added in version 3.0.0.
- do_get_prev_buffer() virtual¶
-
Get future playback buffer.
Added in version 3.0.0.
- do_get_start_note_offset() virtual¶
- Returns:
start note offset
- Return type:
Get current playback start note offset.
Added in version 9.0.0.
- do_get_sub_block_count() virtual¶
- Returns:
the sub block count
- Return type:
Get sub block count.
Added in version 3.0.0.
- do_get_uptime() virtual¶
- Returns:
playback time as string
- Return type:
Get playback time as string.
Added in version 3.0.0.
- do_is_available() virtual¶
-
Get available.
Added in version 3.0.0.
- do_is_playing() virtual¶
-
Get playing.
Added in version 3.0.0.
- do_is_recording() virtual¶
-
Get recording.
Added in version 3.0.0.
- do_is_starting() virtual¶
-
Get starting.
Added in version 3.0.0.
- do_list_cards() virtual¶
- Returns:
- card_id:
a list containing card ids
- card_name:
a list containing card names
- Return type:
Retrieve card_id and card_name as a list of strings.
Added in version 3.0.0.
- do_lock_buffer(buffer) virtual¶
-
Lock buffer.
Added in version 3.0.0.
- do_offset_changed(note_offset) virtual¶
- Parameters:
note_offset (
int) – the current note offset
Callback when counter expires minor note offset.
Added in version 3.0.0.
- do_pcm_info(card_id) virtual¶
- Parameters:
card_id (
str) – the selected soundcard by its string identifier- Returns:
- channels_min:
min channels supported
- channels_max:
max channels supported
- rate_min:
min samplerate supported
- rate_max:
max samplerate supported
- buffer_size_min:
min buffer size supported by soundcard
- buffer_size_max:
max buffer size supported by soundcard
- Return type:
(channels_min:
int, channels_max:int, rate_min:int, rate_max:int, buffer_size_min:int, buffer_size_max:int)
Retrieve detailed information of card_id soundcard.
Added in version 3.0.0.
- do_play() virtual¶
Plays the current buffer of soundcard.
Added in version 3.0.0.
- do_play_init() virtual¶
Initializes the soundcard for playback.
Added in version 3.0.0.
- do_record() virtual¶
Records the current buffer of soundcard.
Added in version 3.0.0.
- do_record_init() virtual¶
Initializes the soundcard for recordback.
Added in version 3.0.0.
- do_set_bpm(bpm) virtual¶
- Parameters:
bpm (
float) – the bpm to set
Set current playback bpm.
Added in version 3.0.0.
- do_set_device(card_id) virtual¶
- Parameters:
card_id (
str) – the device to set
Set device.
Added in version 3.0.0.
- do_set_presets(channels, rate, buffer_size, format) virtual¶
- Parameters:
channels (
int) – the audio channelsrate (
int) – the sampleratebuffer_size (
int) – the buffer sizeformat (
Ags.SoundcardFormat) – the format
Set presets.
Added in version 3.0.0.
- do_set_start_note_offset(start_note_offset) virtual¶
- Parameters:
start_note_offset (
int) – the start note offset to set
Set current playback start note offset.
Added in version 9.0.0.
- do_stop() virtual¶
Stops the soundcard from playing to it.
Added in version 3.0.0.
- do_tic() virtual¶
Every call to play may generate a tic.
Added in version 3.0.0.
- do_trylock_sub_block(buffer, sub_block) virtual¶
- Parameters:
- Returns:
- Return type:
Trylock sub block.
Added in version 3.0.0.
- do_unlock_buffer(buffer) virtual¶
-
Unlock buffer.
Added in version 3.0.0.
Signal Details¶
- Ags.Soundcard.signals.offset_changed(soundcard, note_offset)¶
- Signal Name:
offset-changed- Flags:
- Parameters:
soundcard (
Ags.Soundcard) – The object which received the signalnote_offset (
int) – new notation offset
The
::offset-changedsignal notifies about changed position within notation.Added in version 3.0.0.
- Ags.Soundcard.signals.stop(soundcard)¶
- Signal Name:
stop- Flags:
- Parameters:
soundcard (
Ags.Soundcard) – The object which received the signal
The
::stopsignal is emitted every stop of the soundcard. This notifies about a newly played buffer.Added in version 3.0.0.
- Ags.Soundcard.signals.tic(soundcard)¶
- Signal Name:
tic- Flags:
- Parameters:
soundcard (
Ags.Soundcard) – The object which received the signal
The
::ticsignal is emitted every tic of the soundcard. This notifies about a newly played buffer.Added in version 3.0.0.