Skip to content

Reenable beep on touch for buttons (but not empty space)#44

Open
Funkenjaeger wants to merge 1 commit into
bartei:mainfrom
Funkenjaeger:feat/beeps
Open

Reenable beep on touch for buttons (but not empty space)#44
Funkenjaeger wants to merge 1 commit into
bartei:mainfrom
Funkenjaeger:feat/beeps

Conversation

@Funkenjaeger
Copy link
Copy Markdown

This reenables the beep functionality. It uses pygame, as with Kivy's SoundLoader I could not seem to eliminate a noticeable lag between button press and the sound playing.

This also switches away from using "on_touch_down" on the HomePage as a catch-all that caused it to beep when you touch anywhere at all, including empty spaces. Instead the beep function is associated with each button (etc.), so it only beeps when you tap something actually interactive.

@Funkenjaeger Funkenjaeger marked this pull request as draft March 29, 2026 14:31
@Funkenjaeger Funkenjaeger marked this pull request as ready for review March 29, 2026 14:31
@Funkenjaeger
Copy link
Copy Markdown
Author

Note that this requires some system changes outside of the RCP repo to get sound working (at least with my raspberry pi 5 and the wisecoco touchscreen display you sell). Namely, create /root/.asoundrc with the following contents:

pcm.!default {
    type plug
    slave.pcm "plughw:0,0"
}

ctl.!default {
    type hw
    card 0
}

You might instead be able to edit /etc/asound.conf and change the default cards from 1 to 0 there.
I suppose these types of changes might need to flow back to your ospi repo instead.

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

Successfully merging this pull request may close these issues.

1 participant