Skip to content

NAudio.MmException: AlreadyAllocated calling waveOutOpen #470

@MrAAA162

Description

@MrAAA162
2/25/2026 5:29:11 PM -05:00 - Error - NAudio.MmException: AlreadyAllocated calling waveOutOpen
   at NAudio.Wave.WaveOutEvent.Init(IWaveProvider waveProvider)
   at MixItUp.WPF.Services.WindowsAudioService.PlayWithOutput(String filePath, Int32 volume, String deviceName) in D:\CODE\com.mixitupapp\Desktop\MixItUp.WPF\Services\WindowsAudioService.cs:line 228
Full Stack:   at System.Environment.get_StackTrace()
   at MixItUp.Base.Util.Logger.Log(LogLevel level, Exception ex, Boolean includeStackTrace) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Util\Logger.cs:line 136
   at MixItUp.Base.Util.Logger.Log(Exception ex, Boolean includeStackTrace) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Util\Logger.cs:line 122
   at MixItUp.WPF.Services.WindowsAudioService.PlayWithOutput(String filePath, Int32 volume, String deviceName) in D:\CODE\com.mixitupapp\Desktop\MixItUp.WPF\Services\WindowsAudioService.cs:line 228
   at MixItUp.WPF.Services.WindowsAudioService.Play(String filePath, Int32 volume, String deviceName, Boolean waitForFinish) in D:\CODE\com.mixitupapp\Desktop\MixItUp.WPF\Services\WindowsAudioService.cs:line 38
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at MixItUp.Base.Model.Actions.SoundActionModel.PerformInternal(CommandParametersModel parameters)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at MixItUp.Base.Model.Actions.SoundActionModel.PerformInternal(CommandParametersModel parameters)
   at MixItUp.Base.Model.Actions.ActionModelBase.Perform(CommandParametersModel parameters) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Model\Actions\ActionModelBase.cs:line 106
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at MixItUp.Base.Services.CommandService.RunDirectlyInternal(CommandInstanceModel commandInstance, CommandParametersModel parameters) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Services\CommandService.cs:line 620
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at MixItUp.Base.Services.CommandService.RunDirectly(CommandInstanceModel commandInstance) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Services\CommandService.cs:line 320
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at MixItUp.Base.Model.Actions.GroupActionModel.RunSubActions(CommandParametersModel parameters) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Model\Actions\GroupActionModel.cs:line 36
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at MixItUp.Base.Model.Actions.ConditionalActionModel.PerformInternal(CommandParametersModel parameters) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Model\Actions\ConditionalActionModel.cs:line 121
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at MixItUp.Base.Model.Actions.ConditionalActionModel.PerformInternal(CommandParametersModel parameters)
   at MixItUp.Base.Model.Actions.ActionModelBase.Perform(CommandParametersModel parameters) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Model\Actions\ActionModelBase.cs:line 106
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at MixItUp.Base.Services.CommandService.RunDirectlyInternal(CommandInstanceModel commandInstance, CommandParametersModel parameters) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Services\CommandService.cs:line 620
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
   at MixItUp.Base.Model.Actions.ActionModelBase.Perform(CommandParametersModel parameters) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Model\Actions\ActionModelBase.cs:line 108
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
   at MixItUp.Base.Model.Actions.ChatActionModel.PerformInternal(CommandParametersModel parameters) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Model\Actions\ChatActionModel.cs:line 51
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
   at MixItUp.Base.Services.ChatService.SendMessage(String message, CommandParametersModel parameters, Boolean sendAsStreamer) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Services\ChatService.cs:line 134
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
   at MixItUp.Base.Services.ChatService.SendMessage(String message, StreamingPlatformTypeEnum platform, Boolean sendAsStreamer, String replyMessageID) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Services\ChatService.cs:line 164
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
   at MixItUp.Base.Services.Twitch.New.TwitchSession.SendMessage(String message, Boolean sendAsStreamer, String replyMessageID) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Services\Twitch\New\TwitchSession.cs:line 493
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
   at MixItUp.Base.Services.Twitch.New.TwitchService.SendChatMessage(UserModel channel, UserModel sender, String message, String replyMessageID) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Services\Twitch\New\TwitchService.cs:line 231
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetResult(TResult result)
   at MixItUp.Base.Util.AsyncRunner.RunAsync[T](Func`1 task) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Util\AsyncRunner.cs:line 58
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
   at MixItUp.Base.Services.Twitch.New.TwitchService.<>c__DisplayClass29_0.<<SendChatMessage>b__0>d.MoveNext() in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Services\Twitch\New\TwitchService.cs:line 230
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetResult(TResult result)
   at MixItUp.Base.Web.AdvancedHttpClient.PostAsync[T](String requestUri, HttpContent content) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Web\AdvancedHttpClient.cs:line 294
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
   at MixItUp.Base.Web.AdvancedHttpClient.PostAsync(String requestUri, HttpContent content) in D:\CODE\com.mixitupapp\Desktop\MixItUp.Base\Web\AdvancedHttpClient.cs:line 283
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
   at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
   at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Net.Security.SslStream.ReadAsyncInternal[TIOAdapter](Memory`1 buffer, CancellationToken cancellationToken)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](CancellationToken cancellationToken, Int32 estimatedSize)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.Sockets.SocketAsyncEventArgs.<>c.<.cctor>b__173_0(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
   at System.Threading.ThreadPoolTypedWorkItemQueue`2.System.Threading.IThreadPoolWorkItem.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() 

Metadata

Metadata

Assignees

No one assigned

    Labels

    LOE:LowImpact to single system and can be addressed by a single developer within a single session.STAT: Todo

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions