Skip to content

Commit

Permalink
fix volume/mute bug for listen.moe backend
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiayang committed Feb 6, 2022
1 parent af038fb commit ec44c4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions MoeStreamer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 0.17.3;
MARKETING_VERSION = 0.17.4;
PRODUCT_BUNDLE_IDENTIFIER = com.zhiayang.MoeStreamer;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "";
Expand Down Expand Up @@ -688,7 +688,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 0.17.3;
MARKETING_VERSION = 0.17.4;
PRODUCT_BUNDLE_IDENTIFIER = com.zhiayang.MoeStreamer;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "";
Expand Down
6 changes: 2 additions & 4 deletions MoeStreamer/src/audio/StreamAudioController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,16 @@ class StreamAudioController : NSObject, AudioController, VLCMediaPlayerDelegate

func mute()
{
self.vlcMP.audio.volume = 0
self.muted = true
self.vlcMP.audio.volume = 0

Settings.set(.audioMuted(), value: true)
}

func unmute()
{
let vol: Int = Settings.get(.audioVolume())

self.vlcMP.audio.volume = Int32(vol)
self.muted = false
self.setVolume(volume: self.volume)

Settings.set(.audioMuted(), value: false)
}
Expand Down

0 comments on commit ec44c4e

Please sign in to comment.