Sometimes the sound clip is not fully played #10

Closed
opened 2020-06-19 15:41:46 +00:00 by Rich · 3 comments
Rich commented 2020-06-19 15:41:46 +00:00 (Migrated from gitlab.rickelobe.com)

On occasion when trying to play a sound in a voice channel, the beginning of the audio is cut off. It is as though there is not enough time given to play the entire clip.

On occasion when trying to play a sound in a voice channel, the beginning of the audio is cut off. It is as though there is not enough time given to play the entire clip.
Rich commented 2020-06-19 15:49:42 +00:00 (Migrated from gitlab.rickelobe.com)

c82dc32ca2 changes the voice channel disconnect wait method. Instead of waiting a hard set # of seconds for each soundfile, it drops into a sleep loop while the file is being played. The bot only disconnects from the voice channel after the player has stopped.

    voice.play(audio_source, after=None)
    while voice.is_playing():
        await asyncio.sleep(1)
    #time.sleep(playtime)
c82dc32ca26e449079c92878c0951b6507bc758e changes the voice channel disconnect wait method. Instead of waiting a hard set # of seconds for each soundfile, it drops into a sleep loop while the file is being played. The bot only disconnects from the voice channel after the player has stopped. ``` voice.play(audio_source, after=None) while voice.is_playing(): await asyncio.sleep(1) #time.sleep(playtime) ```
Rich commented 2020-06-22 15:33:11 +00:00 (Migrated from gitlab.rickelobe.com)

After waiting a few days and testing, the issue appears to be resolved. The sound was not cut short at all!!!

After waiting a few days and testing, the issue appears to be resolved. The sound was not cut short at all!!!
Rich commented 2020-06-22 15:33:11 +00:00 (Migrated from gitlab.rickelobe.com)

closed

closed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rich/r0b3BOT#10