Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PistonDevelopers/music
/ functions
Functions
15 in github.com/PistonDevelopers/music
⨍
Functions
15
◇
Types & classes
7
↓ 3 callers
Function
bind_music_file
Binds a music file to value.
src/lib.rs:89
↓ 3 callers
Function
bind_sound_file
Binds a sound file to value.
src/lib.rs:99
↓ 3 callers
Function
play_music
Plays a music track.
src/lib.rs:143
↓ 3 callers
Function
play_sound
Plays a sound effect track. The volume is set on a scale of 0.0 to 1.0, which means 0-100%. Values greater than 1.0 will use 1.0. Values less than 0.
src/lib.rs:155
↓ 3 callers
Function
set_volume
Sets the volume of the music mixer. The volume is set on a scale of 0.0 to 1.0, which means 0-100%. Values greater than 1.0 will use 1.0. Values less
src/lib.rs:131
↓ 2 callers
Method
to_sdl2_repeats
(&self)
src/lib.rs:118
↓ 2 callers
Function
to_sdl2_volume
Converts from piston_music volume representation to SDL2 representation. Map 0.0 - 1.0 to 0 - 128 (sdl2::mixer::MAX_VOLUME).
src/lib.rs:138
↓ 1 callers
Function
current_music_tracks
()
src/lib.rs:40
↓ 1 callers
Function
current_sound_tracks
()
src/lib.rs:44
↓ 1 callers
Function
init_audio
Initializes the audio mixer and allocates the number of concurrent sound channels.
src/lib.rs:22
Function
main
()
examples/test-sdl-context.rs:18
Function
main
()
examples/test-mp3.rs:16
Function
main
()
examples/test.rs:16
Function
start
Creates SDL context and starts the audio context `num_sound_channels`: The number of concurrent sound channels to allocate. This limits the number of
src/lib.rs:52
Function
start_context
Initializes audio and sets up current objects `num_sound_channels`: The number of concurrent sound channels to allocate. This limits the number of so
src/lib.rs:65