mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 13:45:34 +08:00
(PlayFile): merged nested try blocks.
This commit is contained in:
parent
df70fc9271
commit
342b96da22
@ -965,13 +965,12 @@ namespace GARbro.GUI
|
||||
|
||||
private void PlayFile (Entry entry)
|
||||
{
|
||||
IBinaryStream input = null;
|
||||
SoundInput sound = null;
|
||||
try
|
||||
{
|
||||
SetBusyState();
|
||||
var input = VFS.OpenBinaryStream (entry);
|
||||
try
|
||||
{
|
||||
input = VFS.OpenBinaryStream (entry);
|
||||
FormatCatalog.Instance.LastError = null;
|
||||
sound = AudioFormat.Read (input);
|
||||
if (null == sound)
|
||||
@ -1002,18 +1001,17 @@ namespace GARbro.GUI
|
||||
CurrentAudio.TotalTime.ToString ("m':'ss")));
|
||||
input = null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (input != null)
|
||||
input.Dispose();
|
||||
}
|
||||
}
|
||||
catch (Exception X)
|
||||
{
|
||||
SetStatusText (X.Message);
|
||||
if (null != sound)
|
||||
sound.Dispose();
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (input != null)
|
||||
input.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private void StopPlaybackExec (object sender, ExecutedRoutedEventArgs e)
|
||||
|
Loading…
Reference in New Issue
Block a user