Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#106 7 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
csharp

Línea de trabajo

Comienza con el ejemplo documentado usando InitializePlaybackDevice, AudioFormat, StreamDataProvider y SoundPlayer; después reproduce el problema con audio por debajo de 44 kHz y formatos que no coinciden. Rastrea cómo el dispositivo de reproducción y el reproductor usan sus formatos, y compara la reproducción entre las combinaciones indicadas. Se considera completado cuando los formatos de audio compatibles se reproducen a velocidad normal sin requerir un dispositivo independiente para cada formato.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C#
Estrellas
520
Forks
56
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de LSXPrime/SoundFlow

Todos los issues de LSXPrime/SoundFlow

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.