Sets the volume for a specific audio stream.
Usage #
package main
import (
t "github.com/hugmouse/gotermux"
)
func main() {
// Set music volume to 10
musicStream := t.TAudioStream{
Stream: "MUSIC",
Volume: 10,
}
t.SetTermuxVolume(musicStream)
}
Parameters #
v TAudioStream
- Audio stream configuration
Audio Stream Types #
Available audio streams (use these string values):
NOTIFICATION
- Notification soundsALARM
- Alarm soundsMUSIC
- Music and media playbackRING
- Ringtone soundsSYSTEM
- System soundsVOICE_CALL
- Voice call audio
You can also use the AudioStream constants and MapOfAudioStreams from the library for type-safe stream selection.