forked from MoonsideGames/MoonWorks
fix memory leak in StreamingSoundQoa.Create
parent
c037b4cb69
commit
76684eaa33
|
@ -26,7 +26,7 @@ namespace MoonWorks.Audio
|
||||||
|
|
||||||
FAudio.qoa_attributes(handle, out var channels, out var samplerate, out var samplesPerChannelPerFrame, out var totalSamplesPerChannel);
|
FAudio.qoa_attributes(handle, out var channels, out var samplerate, out var samplesPerChannelPerFrame, out var totalSamplesPerChannel);
|
||||||
|
|
||||||
return new StreamingSoundQoa(
|
var streamingSound = new StreamingSoundQoa(
|
||||||
device,
|
device,
|
||||||
filePath,
|
filePath,
|
||||||
channels,
|
channels,
|
||||||
|
@ -34,6 +34,10 @@ namespace MoonWorks.Audio
|
||||||
samplesPerChannelPerFrame,
|
samplesPerChannelPerFrame,
|
||||||
totalSamplesPerChannel
|
totalSamplesPerChannel
|
||||||
);
|
);
|
||||||
|
|
||||||
|
FAudio.qoa_close(handle);
|
||||||
|
|
||||||
|
return streamingSound;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal unsafe StreamingSoundQoa(
|
internal unsafe StreamingSoundQoa(
|
||||||
|
|
Loading…
Reference in New Issue