ukasz123 / soundpool

Soundpool plugin for Flutter
88 stars 63 forks source link

Windux: setVolume throws UnimplementedError although it has been implemented in Rust. #126

Open kestlerio opened 8 months ago

kestlerio commented 8 months ago

Calling Soundpool.setVolume(...) under Windows throws an UnimplementedError although there seems to be an implementation in the Rust code.

In soundpool/soundpool_windux/lib/soundpool.windux.dart we can see

  @override
  Future<void> setVolume(int poolId, int? soundId, int? streamId,
      double? volumeLeft, double? volumeRight) {
    throw UnimplementedError('setVolume() has not been implemented');
  }

However, the Windux documentation says that set_volume has been implemented and also the Rust code in soundpool/soundpool_windux/rust/src/soundpool.rs seems to have this implementation.

                SetVolume(sound_id, volume) => {
                    set_volume(&mut sounds, &streams_tx, sound_id, volume);

Maybe the functionality is really there but the calling Dart code just has not been updated? Anyway, thank you very much for this library!