mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Fix crash on setting volume before image is loaded
This commit is contained in:
@@ -113,7 +113,6 @@ namespace RedBookPlayer
|
|||||||
if (volume >= 0 && volume <= 100)
|
if (volume >= 0 && volume <= 100)
|
||||||
{
|
{
|
||||||
volume = value;
|
volume = value;
|
||||||
soundOut.Volume = (float)volume / 100;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -191,6 +190,8 @@ namespace RedBookPlayer
|
|||||||
|
|
||||||
public int ProviderRead(byte[] buffer, int offset, int count)
|
public int ProviderRead(byte[] buffer, int offset, int count)
|
||||||
{
|
{
|
||||||
|
soundOut.Volume = (float)Volume / 100;
|
||||||
|
|
||||||
ulong sectorsToRead;
|
ulong sectorsToRead;
|
||||||
ulong zeroSectorsAmount;
|
ulong zeroSectorsAmount;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user