CL_Sound3
Sound interface in clanlib.
Overview
This class provides a list of all soundcards available on the system. It is also a wrapper class for the CL_SoundCard class, providing an easier access to a single selected soundcard.
All the functions that share name with those in CL_SoundCard have the same functionality. The only difference is, that the ones CL_Sound operate on a selected soundcard. This saves the trouble of passing around a pointer to the soundcard, when only a single one is used anyway.
Class members
- virtual
~CL_Sound()
- static std::vector<CL_SoundCard*>
cards
- static std::list<CL_SoundCard*>
preload_cards
- static CL_StreamSoundProvider *
get_microphone()
- static CL_StreamSoundProvider *
get_line_in()
- static void
clear_card_preload()
- static void
add_card_preload( -
CL_SoundCard *card)
- static void
remove_card_preload( -
CL_SoundCard *card)
- static void
select_card( -
CL_SoundCard *card)
- static void
select_card( -
int card_no)
- static CL_SoundCard *
get_current_card()
Members with descriptions
- virtual
~CL_Sound() -
Description:
- static std::vector<CL_SoundCard*>
cards -
Description:
The list of soundcards available on this system.
- static std::list<CL_SoundCard*>
preload_cards -
Description:
List of all cards where soundbuffers are automatically preloaded.
- static CL_StreamSoundProvider *
get_microphone() -
Description:
Returns the streamed soundprovider representing the microphone.
Return value:
The microphone.
- static CL_StreamSoundProvider *
get_line_in() -
Description:
Returns the streamed soundprovider representing the line in.
Return value:
The line in.
- static void
clear_card_preload() -
Description:
Clears the list of preloaded soundcards.
- static void
add_card_preload( -
CL_SoundCard *card)
Parameters: card - The card to be added to the preload list.
Description:
Adds card to the preloaded soundcards list. This means all soundbuffers will be automatically preloaded onto the card. By default the first card is always on the preload list.If a card isnt on the list, the soundbuffers data will first be loaded when the sample is actually played for the first time.
- static void
remove_card_preload( -
CL_SoundCard *card)
Parameters: card - The card to be removed from the list.
Description:
Removes the specified card from the preload list.
- static void
select_card( -
CL_SoundCard *card)
Parameters: card - The new current selected soundcard.
Description:
Change the current selected soundcard to card.
- static void
select_card( -
int card_no)
Parameters: card_no - Card number in the CL_Sound::cards list.
Description:
Change the current selected soundcard to soundcard number card_no.
- static CL_SoundCard *
get_current_card() -
Description:
Returns the current selected soundcard.
Return value:
Current soundcard.