Skip to content

Commit

Permalink
Merge branch 'master' of github.com:flibitijibibo/FNA
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0ade committed Nov 18, 2015
2 parents 93df26f + d6bbcfd commit ecfb8e0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Audio/OpenALDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,12 @@ out bufLen
AL10.AL_BITS,
out bits
);
if (bufLen == 0 || bits == 0)
{
throw new InvalidOperationException(
"OpenAL buffer allocation failed!"
);
}
TimeSpan resultDur = TimeSpan.FromSeconds(
bufLen /
((bits > 0d ? ((double) bits) : 24d) / 8d) /
Expand Down

0 comments on commit ecfb8e0

Please sign in to comment.