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

Encoded wav is entirely static noise #38

Open
Jsewill opened this issue Mar 19, 2024 · 0 comments
Open

Encoded wav is entirely static noise #38

Jsewill opened this issue Mar 19, 2024 · 0 comments

Comments

@Jsewill
Copy link

Jsewill commented Mar 19, 2024

When using this library to transcode a wav file from pcm_s24le (as ffprobe reports), into a pcm_s16le wav file, the resulting file is just static noise. I based my attempts off of the wave to aiff example found here: https://github.com/go-audio/wav/blob/master/cmd/wavtoaiff/main.go . However, I got the same result using my own hackish, handwritten transcoder, prior to attempting to use this one. Yet, ffmpeg has no problem transcoding the same file from s24le to s16le, and produces a coherent wav file without noise. Do you have any idea why might this be?

Here's some output, regarding the wav file which I'm attempting to convert, from mplayer:

Clip info:
 encoder: FL Studio 21
[pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 2 ch, s24le, 2304.0 kbit/100.00% (ratio: 288000->288000)
AO: [alsa] 48000Hz 2ch s24le (3 bytes per sample)

and from ffmpeg:

Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 2 channels, s32 (24 bit), 2304 kb/s

I've even tried using the audio.PCMBuffer type, with the SwitchPrimaryType function, to no avail. The only thing my program does with the decoder before calling PCMBuffer() with an audio.IntBuffer (as per the example), is to check IsValidFile(). I've noticed that if I read the metadata, the reader isn't reset, so I've avoided any calls which might prevent it from reading the PCM data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant