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 sounds
  • ALARM - Alarm sounds
  • MUSIC - Music and media playback
  • RING - Ringtone sounds
  • SYSTEM - System sounds
  • VOICE_CALL - Voice call audio
You can also use the AudioStream constants and MapOfAudioStreams from the library for type-safe stream selection.