Commit 68953122 authored by Viktor Lidholt's avatar Viktor Lidholt

Removes the ability to jump to different positions in sound effects (this...

Removes the ability to jump to different positions in sound effects (this isn't supported on Android)
parent 130119df
...@@ -23,7 +23,6 @@ class SoundStream { ...@@ -23,7 +23,6 @@ class SoundStream {
this.sound, this.sound,
this.tag, this.tag,
this.loop, this.loop,
this.time,
this.volume, this.volume,
this.pitch, this.pitch,
this.pan, this.pan,
...@@ -34,7 +33,6 @@ class SoundStream { ...@@ -34,7 +33,6 @@ class SoundStream {
SoundEffect sound; SoundEffect sound;
bool playing = false; bool playing = false;
bool loop = false; bool loop = false;
double time = 0.0;
double volume = 1.0; double volume = 1.0;
double pitch = 1.0; double pitch = 1.0;
double pan = 0.0; double pan = 0.0;
...@@ -94,7 +92,6 @@ class SoundPool { ...@@ -94,7 +92,6 @@ class SoundPool {
double volume = 1.0, double volume = 1.0,
double pitch = 1.0, double pitch = 1.0,
double pan = 0.0, double pan = 0.0,
double startTime = 0.0,
SoundCompleteCallback callback = null]) { SoundCompleteCallback callback = null]) {
// Create new PlayingSound object // Create new PlayingSound object
...@@ -102,7 +99,6 @@ class SoundPool { ...@@ -102,7 +99,6 @@ class SoundPool {
sound, sound,
tag, tag,
loop, loop,
startTime,
volume, volume,
pitch, pitch,
pan, pan,
...@@ -117,7 +113,7 @@ class SoundPool { ...@@ -117,7 +113,7 @@ class SoundPool {
// Prepare sound, then play it // Prepare sound, then play it
_prepare(playingSound).then((_) { _prepare(playingSound).then((_) {
playingSound._player.ptr.seekTo((startTime * 1000.0).toInt()); playingSound._player.ptr.seekTo(0);
playingSound._player.ptr.start(); playingSound._player.ptr.start();
}); });
...@@ -126,7 +122,7 @@ class SoundPool { ...@@ -126,7 +122,7 @@ class SoundPool {
} else { } else {
// Reuse player // Reuse player
playingSound._player = _mediaPlayers[sound]; playingSound._player = _mediaPlayers[sound];
playingSound._player.ptr.seekTo((startTime * 1000.0).toInt()); playingSound._player.ptr.seekTo(0);
playingSound._player.ptr.start(); playingSound._player.ptr.start();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment