Closed imekon closed 6 years ago
did you try converting it or recompressing it? I know the current decoder (stb_vorbis) has problems with some older ogg files.
On Thu, Jan 18, 2018 at 3:01 PM, Pete Goodwin notifications@github.com wrote:
Godot V3.0 RC1
Windows 10
Play a simple ogg vorbis stream, it plays in left channel only and stutters. Same setup works fine on same hardware in V2.1.4 official release.
Steps to reproduce: streamPlayer.stream = musicStream streamPlayer.play()
Minimal reproduction project:
MusicPlayerRC1.zip https://github.com/godotengine/godot/files/1643936/MusicPlayerRC1.zip
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/15847, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-Z2xyitjifH1mYrGHVyfHB540ptvl6ks5tL4cVgaJpZM4RjVOw .
Yes, tried reencoding. Still stutters and comes out of left channel only.
You are using an AudioStreamPlayer2D
which is used to play 2D positional audio. Its postion is top-left so that's why it plays only in the left channel. You need to use an AudioStreamPlayer
to play music.
That fixed the left channel only playing, however it still stutters. Since it's playing at a slower speed, I think it's dropping audio blocks.
I can't reproduce the stutters https://streamable.com/xmeyx
Doesn't stutter for me. Tried to change the sample rate of my audio interface, but in any config it still plays fine.
Is there any message in the console window/output panel?
This is all that appears in the console:
OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2 GLES3: max ubo light: 409 GLES3: max ubo reflections: 455, ubo size: 144 ARVR: Registered interface: Native mobile OPENING: D:/samples/godot/MusicPlayerRC1 (D:::samples::godot::MusicPlayerRC1) running cmdline: "D:\tools\godot 3.0 rc\Godot_v3.0-rc1_win64.exe" "--path" "D:/samples/godot/MusicPlayerRC1" "--editor" OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2 GLES3: max ubo light: 409 GLES3: max ubo reflections: 455, ubo size: 144 ARVR: Registered interface: Native mobile erasing C:\Users\goodwin\AppData\Roaming/Godot/projects/MusicPlayerRC1-567aab528bb594fb906e52a45e61b280/filesystem_update3 Running: D:\tools\godot 3.0 rc\Godot_v3.0-rc1_win64.exe --path D:/samples/godot/MusicPlayerRC1 --remote-debug 127.0.0.1:6007 --allow_focus_steal_pid 8064 --position 448,240 running cmdline: "D:\tools\godot 3.0 rc\Godot_v3.0-rc1_win64.exe" "--path" "D:/samples/godot/MusicPlayerRC1" "--remote-debug" "127.0.0.1:6007" "--allow_focus_steal_pid" "8064" "--position" "448,240" OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2 GLES3: max ubo light: 409 GLES3: max ubo reflections: 455, ubo size: 144 ARVR: Registered interface: Native mobile
I'm guessing this is specific to my hardware (ugh), so I'll try this on my laptop when I next get to it (in a few days). I may try a different encoder - I'm using audacity.
Maybe try a different song. Here's some: http://www.vorbis.com/music/
I tried a couple from http://www.vorbis.com/music/, same stuttering.
I tested on Windows and Mac and I got no stuttering with that project. It plays on the left speaker only too here, but if I use a AudioStreamPlayer node instead of a AudioStreamPlayer2D node it plays on both speakers correctly.
Anyway to change output to XAudio2 or RtAudio? Project config only shows WASAPI and it's a string not a dropdown. I did try XAudio2 or RtAudio but they didn't work.
Try with the string RtAudio-DirectSound in the project config.
Woohoo! That did it, it's playing perfectly now!
That's odd, I wonder why its stuttering for you with WASAPI driver.. what audio card do you have?
I have a USB Terratec DMX 6Fire sound card.
What frequency is Windows using for your card? 192 kHz?
If it helps, from my time doing audio software, sometimes you request a buffer size and the API returns a different one, so still need to check back.
Not sure if the case in Wasapi
On Jan 19, 2018 5:46 PM, "Marcelo Fernandez" notifications@github.com wrote:
What frequency is Windows using for your card? 192 kHz?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/15847#issuecomment-359084176, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-Z23CJsSAV_y1i5-Cxw9uxnWAayiPbks5tMP8IgaJpZM4RjVOw .
The frequency is 176400Hz, that seems to be the default for Windows 10.
from my time doing audio software
I used to work for Sensaura, on WDM device drivers for audio, then audio at Codemasters for various racing games.
The frequency is 176400Hz, that seems to be the default for Windows 10.
Can you test with a lower frequency, 44100 Hz or 48000 Hz? thanks!
I just spent the last 10 minutes with no audio after changing frequency to anything other than 176.4kHz. It simply says for 44100 "not supported". Bit strange it shows it in the drop down list then. Once I set it back to 176.4kHz, shutdown, wait for everything to switch off, then restart, eventually I got audio back. It's an old sound card... maybe I should consider upgrading... I like it because it has so many external inputs.
41000 not supported?! It's the most supported rate out there. Weird. It sounds like some setting or driver problem somewhere.
Checked this on my laptop - no stutter with WASAPI. I think the fault is with my dodgy sound card.
Same here. Godot 3.2 / 3.2.2, on ONE Windows machine .ogg playback with 44100 Hz samplerate is slow/sluttering. Tried changing audio driver string to RtAudio-DirectSound - nothing changes. I have this in the logs:
**WARNING**: WASAPI: Unsupported number of channels: 1
At: drivers/wasapi/audio_driver_wasapi.cpp:330:init_render_device() - WASAPI: Unsupported number of channels: 1
UPD: the problem only manifests itself with a certain audio-device (Usb headset), on an internal Realtek audio-card the output is fine.
Tried changing audio driver string to RtAudio-DirectSound - nothing changes.
As far as I know, RtAudio is no longer present in Godot since 3.1. There's an XAudio driver but it's not compiled in by default, and I doubt it still works in the current state of things.
UPD: the problem only manifests itself with a certain audio-device (Usb headset), on an internal Realtek audio-card the output is fine.
Try changing the device's output sample rate. USB headsets embed their own sound card, which means they're seen as additional output devices (like HDMI audio).
Try changing the device's output sample rate. USB headsets embed their own sound card, which means they're seen as additional output devices (like HDMI audio).
The problem was narrowed to down to a device having mono-output (1 channel). So logically those headphones have 2 output devices: one is chat (mono) the second is game (stereo). Both have 48k output rate. Chat device output is buggy, the game output is fine. Chat also shows this in the logs:
**WARNING**: WASAPI: Unsupported number of channels: 1
At: drivers/wasapi/audio_driver_wasapi.cpp:330:init_render_device() - WASAPI: Unsupported number of channels: 1
So basically Godot doesn't play well with WASAPI mono devices. I have no idea how to fix that..
Godot V3.0 RC1
Windows 10
Play a simple ogg vorbis stream, it plays in left channel only and stutters. Same setup works fine on same hardware in V2.1.4 official release.
Steps to reproduce: streamPlayer.stream = musicStream streamPlayer.play()
Minimal reproduction project:
MusicPlayerRC1.zip