Skip to content

Commit

Permalink
Added Sound.getVolume and getPitch
Browse files Browse the repository at this point in the history
  • Loading branch information
kerbybit committed Mar 26, 2020
1 parent b1a26b0 commit 82689fe
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ class Sound(private val config: NativeObject) {
*/
fun setVolume(volume: Float) = apply { sndSystem!!.setVolume(this.source, volume) }

fun getVolume() = sndSystem!!.getVolume(this.source)

/**
* Updates the position of this sound
*
Expand All @@ -179,6 +181,8 @@ class Sound(private val config: NativeObject) {
*/
fun setPitch(pitch: Float) = apply { sndSystem!!.setPitch(this.source, pitch) }

fun getPitch() = sndSystem!!.getPitch(this.source)

/**
* Sets the attenuation (fade out over space) of the song.
* Models are:
Expand Down

0 comments on commit 82689fe

Please sign in to comment.