Skip to content

Commit

Permalink
No sfx play fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Algorithman committed Aug 15, 2016
1 parent ff2cfab commit c3a1789
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion SoundCenSe GTK/Misc/Misc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<OutputType>Library</OutputType>
<RootNamespace>Misc</RootNamespace>
<AssemblyName>Misc</AssemblyName>
<ReleaseVersion>1.4.1</ReleaseVersion>
<ReleaseVersion>1.4.2</ReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
2 changes: 1 addition & 1 deletion SoundCenSe GTK/SoundCenSeGTK.sln
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,6 @@ Global
$0.VersionControlPolicy = $28
$28.inheritsSet = Mono
description = SoundCenSe, a audio engine for Dwarf Fortress, based on ZweiStein's SoundSense
version = 1.4.1
version = 1.4.2
EndGlobalSection
EndGlobal
11 changes: 7 additions & 4 deletions SoundCenSe GTK/SoundCenSeGTK/Output/fmodPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,14 @@ public void PlaySound(SoundSoundFile sf, string channel, float volume = 1.0f, bo
FMOD.Sound newSound;
if (sf.Sound.loop == Loop.Stop_Looping)
{
fmodChannelSound chan = FmodChannelPool.Instance.GetSingleChannel(channel.ToLower());
if (chan != null)
if (!string.IsNullOrEmpty(channel))
{
chan.SoundSoundFile = sf;
chan.StopLooping();
fmodChannelSound chan = FmodChannelPool.Instance.GetSingleChannel(channel.ToLower());
if (chan != null)
{
chan.SoundSoundFile = sf;
chan.StopLooping();
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion SoundCenSe GTK/SoundCenSeGTK/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion ("1.4.1.*")]
[assembly: AssemblyVersion ("1.4.2.*")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
2 changes: 1 addition & 1 deletion SoundCenSe GTK/SoundCenSeGTK/SoundCenSeGTK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>SoundCenSeGTK</RootNamespace>
<AssemblyName>SoundCenSeGTK</AssemblyName>
<ReleaseVersion>1.4.1</ReleaseVersion>
<ReleaseVersion>1.4.2</ReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
2 changes: 1 addition & 1 deletion SoundCenSe GTK/SoundCenSeGUI/SoundCenSeGUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<OutputType>Library</OutputType>
<RootNamespace>SoundCenSeGUI</RootNamespace>
<AssemblyName>SoundCenSeGUI</AssemblyName>
<ReleaseVersion>1.4.1</ReleaseVersion>
<ReleaseVersion>1.4.2</ReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down

0 comments on commit c3a1789

Please sign in to comment.