Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[BUG] [CRITICAL] Audio format mismatch leads to distorted sound playback

Aperta
#106 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
csharp

Direzione di ricerca

Inizia con l’esempio documentato usando InitializePlaybackDevice, AudioFormat, StreamDataProvider e SoundPlayer, quindi riproduci il problema con audio al di sotto di 44 kHz e formati non corrispondenti. Traccia il modo in cui il dispositivo di riproduzione e il player usano i rispettivi formati e confronta la riproduzione tra le combinazioni segnalate. Il lavoro è completato quando i formati audio supportati vengono riprodotti a velocità normale senza richiedere un dispositivo separato per ogni formato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Requirements
  • I have searched the existing issues to ensure this bug has not already been reported.
  • I have provided a clear and concise description of the bug.
  • I have provided detailed steps to reproduce the bug.
  • I have included a minimal reproducible example (MRE) if applicable.
  • I have provided error messages and stack traces if applicable.
  • I have completed the environment information.
1. Describe the Bug

Audio file and playback device format mismatch leads to distorted sound playback.
I need to create playback device for file's format unless I got distorted (fast or slow) sound play.

2. Steps to Reproduce

Just run the code with less than 44khz audio

3. Expected Behavior

I get "normal" sound play whatever format I choose.

4. Current Behavior

I get "distorted" sound play IF playback device format mismatches.

5. Minimal Reproducible Example (MRE)

This code is from the official documentation.

var engine = new MiniAudioEngine();
var format = AudioFormat.DvdHq;
using var playbackDevice = engine.InitializePlaybackDevice(null, format);

// Create a SoundPlayer
using var dataProvider = new StreamDataProvider(engine, File.OpenRead("audio.wav")); // Auto-detects format
var player = new SoundPlayer(engine, format, dataProvider);

// Add components to the device's MasterMixer
playbackDevice.MasterMixer.AddComponent(player);

// Start the device to enable its audio stream
playbackDevice.Start();
player.Play();
6. Error Messages and Stack Trace (if applicable)

SoundFlow Version

1.4.0

.NET Version

.NET 10

Operating System

Windows 11

Architecture

x64

Audio Backend Used (if known)

No response

Specific Audio Hardware (if relevant)

No response

8. Affected Components/Modules (if known)

No response

9. Impact

incorrect audio output

10. Possible Workaround (if known)

create a playback device per audio format (which is not ideal..)

11. Additional Context

SoundPlayer's format has no effect on this. and API regarding the format is very confusing by itself. I think it's not common to play distorted sound intentionally in this way.

Lingua principale
C#
Stelle
520
Fork
56
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di LSXPrime/SoundFlow

Tutte le issue di LSXPrime/SoundFlow

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.