Menu

#293 Stamp description sound not playing after stamp sound effect

v0.9.33
closed
nobody
None
1
2024-10-03
2024-10-01
No

When choosing a stamp that has both a sound effect and a description sound (e.g., in English, the 2nd frog in the animals collection), the description sound should play automatically after the sound effect ends. This does not appear to be happening.

When a stamp contains both sounds, a callback to playstampdesc() is set up via Mix_ChannelFinished(). That function sets up an SDL_Event of type SDL_USEREVENT (with user.code of USEREVENT_PLAYDESCSOUND and user.data1 being the current stamp). I've confirmed that SDL_PushEvent() is returning success (1), and that the main loop code that we're handling user events (e.g., USEREVENT_TEXT_UPDATE to show a stamp description after temporarily showing a random string from great_strs[]).

Discussion

  • William Kendrick

    • Group: v0.9.32 --> v0.9.33
     
  • Pere Pujal i Carabantes

    I did some tests and found an interesting thing:
    There are frog, blackbird, crow and more that have descs
    frog doesn't play, blackbird and crow plays.
    If I rename amphibians to zamphibians,then frog goes to the end of the stamps and plays
    but then blackbird doesn't play, crow still plays.

    Looks that the problem is the first of the list?

     
  • Pere Pujal i Carabantes

    I've put a lot of printfs here and there and found where the pushed event get trapped, but I don't understand why only the event corresponding to the frog is trapped there and not the ones of the other stamps?

    The pushed event enters in this check and not arrives to the USEREVENT check:
    else if ((event.type == SDL_MOUSEBUTTONDOWN ||
    event.type == TP_SDL_MOUSEBUTTONSCROLL) && event.button.button <= 3)

                HTH
    
     
  • Pere Pujal i Carabantes

    I have something that works for me, by registering an own event for playing descs.
    Please review it.
    Thanks
    Pere

     
    • William Kendrick

      Thanks Pere! It seems to help, so I've committed it.

       
  • William Kendrick

    • status: open --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.