-
Notifications
You must be signed in to change notification settings - Fork 100
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
[Windows] Static with -o to stdout #253
Comments
I suspect this might be the cause: Lines 699 to 701 in b004fca
That is needed so that track titles containing non-ASCII characters display correctly. Perhaps you could try removing that line to see if the problem goes away. |
I've tested with the line removed and the noise is still present on 32/64bit Windows builds. Are you able to duplicate the noise issue I'm encountering? |
Does the output file still look the same in your hex editor after that change? It could also be that newlines are problematic. I don't often use Windows, so I haven't tested this. Any information you can gather would be helpful. |
It does still look the same after that change. I removed the line, removed build-win32 folder and then ran I've attached some screenshots of what I'm seeing via the hex editor and it looks fairly unchanged. Also here are the sample Original Redirect (Doesn't open, and if header fixed contains noise) Test Wav Original (No noise) I attempted to look through the source a bit more but so far I've not come across anything obvious however I've never written anything in C. I was thinking it could be something with the Line 91 in bb41b4f
However, after further thought I don't think its relevant considering it works perfectly fine on Linux so it must be something else with the way Windows is handling the stdout. Is it possible that it has something to do with binary/text modes when the file is opened on Windows? I don't believe Unix has this distinction between binary and text modes but I could be mistaken. Thanks again for your help with this 👍 |
Text mode does sound like a likely candidate. Could you try adding |
I attempted to use I added I'm starting to think we are on the right track. Is it possible we need to call Or Is it possibly an issue with: Line 94 in b004fca
https://xiph.org/ao/doc/ao_open_file.html Maybe the way Windows is treating stdout via libao? Do we need to call From AO Driver Docs:
However it seems the 'wav' driver is used on Linux as well and writing to stdout then redirecting to a file works without issue. |
On Windows what I've always done to write to wave file on Windows is Does this solve the issue for you? I just tested this here with a fresh build and it appears to work fine here exactly like this. Tho, This isn't stdout but i figured I'd add my two cents in :) |
@pclov3r I understand that Thanks for your two cents though. |
@pclov3r Can you possibly try Thanks for your help and time spent investigating 👍 |
That seems to have made no difference here. Hum... |
That is strange, what version of Windows are you running? So you are saying that the resulting testredirect.wav file is playable? Would you be able to provide a sample of the output with Thanks again! |
Sorry! I meant to say that it made no difference form the issue your having. Trying to play the file in VLC results in the same static audio that your having. :) |
Ah gotcha, thank you for clarifying 👍 |
Hey there,
I'm not certain but I believe this is a bug encountered on the Windows Builds.
The below command on Ubuntu 18.04 will redirect stdout to the testredirect.wav file.
nrsc5 -o - 101.5 0 > _testredirect.wav
This works on Ubuntu 18.04 and will provide a .wav file which opens in VLC and plays without issue.
If you run the same command using a Windows build it will redirect to the testredirect.wav file but the produced file is un-usable.
When attempting to open via Groove Music you encounter an error:
At first it seems you are unable to play this produced file but upon more investigation it may be a header issue. I produced another .wav file using the following command:
nrsc5 -o testsavetofile.wav 101.5 0
This produced a file testsavetofile.wav that does play and works perfectly. I then compared the two files using HxD and it seems the broken file testredirect.wav has a "funky" header which I thought was causing the issues. I created a new file called franken.wav which uses the header from testsavetofile.wav and the data from testredirect.wav. This leaves me with a working .wav file which will play but has an extreme amount of static/noise however you can hear the station in the background.
I originally encountered this bug yesterday when attempting to run the following NodeJS code using the Windows build:
To run the above code save as index.js and run the following commands within an empty folder using NodeJS v14.15.1:
I ran the above NodeJS code using v14.15.1 on Windows first.
It will play the audio over speakers and save a .wav file with the proper headers but the produced audio contains a lot of noise.
This morning I ran the same code but using a PC running Ubuntu 18.04 with the Linux build. The above NodeJS code and also the commands work perfectly under linux. The audio contains no noise and is clear.
I've tested this across two Windows 10 PCs but using the same RTL2832U + R820T SDR receiver.
Is it possible I'm doing something wrong within my setup or maybe this is a known/expected output on Windows?
I've attached a samples.zip which includes the produced files above for troubleshooting.
samples.zip
Also, I've tried the MSYS2 64bit build, Ubuntu Cross-Complied mingw-w64 (64/32bit) builds both contain noise in the audio when using
-o -
in the command args.Here are some screenshots of the Hex for a working .wav and the broken noisy .wav:
Thank you so much for this sweet open source software and all of the time invested,
Ryan Merritt
The text was updated successfully, but these errors were encountered: