-
Notifications
You must be signed in to change notification settings - Fork 354
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
Possibly new audio issue #176
Comments
Are you running in low-latency mode or sync mode? Have you given the process higher priority, e.g. |
I don't notice a difference in the (poor) audio performance w/ and w/o low latency mode. Changing the niceness doesn't improve the performance either. |
Bump. Compiled RPiPlay again yesterday and I have same issue. |
What Pi model are you using? Does rolling back to commit 576c5a6 fix the issue? |
Iam noob, dont know how to undue that commit. What I can say is that Iam using Pi 4b+, and it seems to be buggy ramdomly. By the way, I tried Rpiplay on my desktop with linux mint few days ago and it worked 100%. |
Ooops, thanks. That free is in the wrong branch. |
Er, I misread. The free is in the right place. Without it, the frame injection will leak. Can you please see if your audio problem persists on 2479ebd with the additional change changing |
And actually, I don't know why you're pointing at that commit in particular.. there are a bunch of commits between the two mentioned.
|
I've been "bubble sorting" trying to find which commit introduces the problem. That's how close I got before posting. I don't know if there's an easier way to sleuth the problem other than checkout, build, test, delete, repeat ad nauseum. |
Ah, OK. Are you using git bisect or just doing it by hand? I'd suggest reverting |
Thank you for mentioning git bisect. I was unaware of that feature. The issue was introduced in a26af86. |
Does increasing the GPU split in raspi-config make any difference? |
If you're out of buffers at that point in the code, switching it to blocking mode won't help since you're not going to be able to render anything anyway until a new buffer is available. |
I've been testing with a 128 split. 256 results in null pointers and a big old mess. No noticeable difference with a 64 split. Making the following change allows audio to be cast. It's reverting the change in a26af86. There is still a problem with volume, but I think that's a separate issue. index bad51bc..d1fe489 100644
--- a/renderers/audio_renderer_rpi.c
+++ b/renderers/audio_renderer_rpi.c
@@ -328,9 +328,7 @@ static void audio_renderer_rpi_render_buffer(audio_renderer_t *renderer, raop_nt
if (audio_delay > 100000)
r->first_packet_time = 0;
- OMX_BUFFERHEADERTYPE *buffer = ilclient_get_input_buffer(r->audio_renderer, 100, 0);
- if (!buffer)
- break;
+ OMX_BUFFERHEADERTYPE *buffer = ilclient_get_input_buffer(r->audio_renderer, 100, 1);
int chunk_size = MIN(time_data_size - offset, buffer->nAllocLen);
memcpy(buffer->pBuffer, p_time_data, chunk_size); |
@bobthechemist reverting did not work for me. I still have glitchy audio after your patch, and even after reverting fa23823. Regarding the low volume, it's a bit silly, but double check your device audio level. My MacBook always connects with very low volume, I have to bump the volume manually after connecting. |
My MBA does that as well.. I always have to mash the volume up button after connecting, but am not sure why yet. |
I have sound glitch here too with iOS 14 and the latest RpiPlay build. Does reverting any of these older commits fix the problem? |
@dogaoz it didn't for me, at least not with the commits suggested in this issue. The |
I have not tried with iOS 14. Further, I suspect my proposed solution “works” because my Raspian distro is upgraded from earlier versions (Jessie to Buster) and the RPi foundation has been moving away from ALSA during this time to exclusively PulseAudio. Bottom line: I think this issue is very sensitive to your RPi environment, and the most recent changes to the OS (using exclusively PulseAudio) may render the original issue moot. |
RPiPlay talks directly to the hardware on the Pi (that’s why external DACs are not supported), so ALSA vs. PulseAudio should not play a role here. |
It still happens to me on iOS 14 @bobthechemist. |
I can confirm that a fresh (as of today) image of Raspbian OS on a RPi 4 and iOS 14.2 are not working nicely with audio. Video streaming works fine. Audio works fine from the RPi (both the audio jack and an attached BT speaker) but audio playing on an iPad does not play on either the jack or BT speaker. This is true for both the latest build and as well as the rolled back version I mentioned earlier in this thread. At this point, I am at a loss as to how one should proceed. |
I have just tried making this work on the latest raspbian image (January 2021). With the rpi audio renderer it doesn't work but I have managed to install gstreamer1.0 and compile RPiPlay with the gstreamer renderer and it works perfectly with RPi 4 and iOS 14. Just install the packages required for desktop building on the rpi and compile as usual, you have to get gstreamer working with pulseaudio. I've installed It seems the rpi renderer is broken in the new raspbian but the gstreamer alternative for audio just works. |
Hi @jscoba , Does it need to some extra steps to make it work? Thank you |
Ah, I found that after I turn on low latency, everything works. |
Hi, I installed gstreamer1.0-tools and gstreamer1.0-pulseaudio according to the instructions above, but I still get an error, what should I do? ./rpiplay -l -n AppleTV -a hdmi -ar gstreamer |
Hi, any succes solving the issue with gstreamer? |
I had to recompile the project after installing the packages. Try running again |
I have deleted the RPiPlay folder then I run again all the commands from the install instructions. Still gstreamer not found:( |
Hi again. I have poor knowledges in ssh / rasbian commands. My setup is : raspberry pi 4 with Raspberry Pi OS Lite - openmediavault 5 / docker / homeassistant etc... What I am doing wrong? Thank you! |
Did you install libgstreamer1.0-dev, libgstreamer-plugins-base1.0-dev, &c.? |
Nope. So after installing all of then and reinstall rpiplay now is working smooth. Many thanks! |
I'm having problems with audio which are similar to #2 however I am using the mirroring feature, not the airplay feature.
Apple device is iPad 6th gen running iOS 13.7. RPi is a B+ running stretch. Screen mirroring works fine. Audio played during screen mirroring (tested the voice memo app, VLC, and some random youtube videos through Safari) is severely distorted (but it is playing).
A copy of the log file written while distorted sound is playing is attached. I do not know how to debug further.
log1.txt
The text was updated successfully, but these errors were encountered: