filoe / cscore

An advanced audio library, written in C#. Provides tons of features. From playing/recording audio to decoding/encoding audio streams/files to processing audio data in realtime (e.g. applying custom effects during playback, create visualizations,...). The possibilities are nearly unlimited.
Other
2.14k stars 450 forks source link

Audio Stops #466

Closed amartens181 closed 2 years ago

amartens181 commented 2 years ago

After 15 minutes of playing while the computer is locked or at other random points in time while playing it, the audio stops playing (because some internal pointer is set incorrectly or something -- the program has to be force closed)

I'm playing OPUS using Concentus/Concentus.Oggfile I've tried both DirectSoundOut and XAudio2 and both have this issue. Reinitializing XAudio2 every time I load an audio file seems to curb it somewhat, but I'm not sure what the root cause is. I'm disposing the streams and voices each time a file is closed, so I'm not sure whether it's a Windows issue or an issue with the library.

amartens181 commented 2 years ago

After switching out the Concentus library for a native one, the problems seem to be gone, so I'll assume the issue was with that library.