Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OBOE in SimplerMixer #24

Closed
CyberDeus opened this issue Nov 2, 2015 · 0 comments
Closed

OBOE in SimplerMixer #24

CyberDeus opened this issue Nov 2, 2015 · 0 comments
Assignees
Labels

Comments

@CyberDeus
Copy link

Hi there,

Great Work!

A couple of bugs you might want to fix:

you have an OBOE in your SimpleMixer.cs

@@ -74,7 +74,7 @@ namespace SimpleMixerSample
int read = sampleSource.Read(_mixerBuffer, 0, count);
for (int i = offset, n = 0; n < read; i++, n++)
{
(remove) if (numberOfStoredSamples < i)
(add) if (numberOfStoredSamples <= i)

Also, I think you need this change:

@@ -152,7 +152,7 @@ namespace SimpleMixerSample
{
lock (_lockObj)
{
(remove) foreach (var sampleSource in _sampleSources)
(add) foreach (var sampleSource in _sampleSources.ToArray())
{
sampleSource.Dispose();
_sampleSources.Remove(sampleSource);

otherwise, it will throw exceptions (the mixer will try to remove sources that have already been removed).

Lastly, I think that FillWithZeros causes more problems than it solves. In particular, the stop event is not raised when FillWithZeros = true.

Schoene Gruesse :)

@filoe filoe self-assigned this Nov 6, 2015
@filoe filoe closed this as completed in 58ec029 Nov 6, 2015
@filoe filoe added the bug label Nov 9, 2015
@filoe filoe added this to the CSCore 1.1 beta2 milestone Feb 29, 2016
filoe added a commit that referenced this issue Mar 5, 2016
opcon pushed a commit to opcon/cscore that referenced this issue May 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants