Skip to content

ass::Sound#

Produces sound effect when the style applied.

Header:#include <AUI/Audio/ASS/Property/Sound.h>
CMake:aui_link(my_target PUBLIC aui::audio)

Examples#

examples/ui/views/src/ExampleWindow.cpp

Views Example — All-in-one views building example.

                // [audio_ass_sound]
                Vertical {
                  _new<AButton>("Button produces sound when clicked") AUI_OVERRIDE_STYLE {
                        ass::on_state::Activated {
                          ass::Sound { IAudioPlayer::fromUrl(":sound/click.ogg") },
                        },
                      },
                } AUI_OVERRIDE_STYLE { LayoutSpacing { 4_dp } },
                // [audio_ass_sound]
              } AUI_OVERRIDE_STYLE { LayoutSpacing { 4_dp } },

Public fields and Signals#


sound#

_<IAudioPlayer> sound

Player of the sound effect.