[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] pygame music



I dropped it into my app and it works perfectly with Ubuntu except a
bit of a performance problem with the way SDL handles mp3 files as
music.rewind() has to be called first before set_pos or
play(start=60).. play(start=60) actually skips ahead 60 seconds if the
music is already playing instead of resetting the start point to 60
seconds.

If the windows build isn't too hairy I'll test it there sometime soon.

Thanks,

Mark


On Mon, May 24, 2010 at 2:23 PM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
> Hi,
>
> I have added set_pos to pygame.mixer.music in svn rev 2809. Other than a
> quick check that it causes an mp3 file to skip forward while playing it is
> quite untested. Updating pygame.mixer.music.play to call Mix_FadeInMusicPos
> will follow. This should be safe as Mix_PlayMusic simply wraps a call to
> Mix_FadeInMusicPos.
>
> Lenard Lindstrom
>
> Lenard Lindstrom wrote:
>>
>> Hi Mark,
>>
>> I don't see a problem adding the Mix_SetMusicPosition and
>> Mix_FadeInMusicPos functions to pygame.mixer.music. As to why they are not
>> in Pygame, it's because they were originally not in SDL_mixer either.
>>
>> Lenard Lindstrom
>>
>> Mark Reed wrote:
>>>
>>> I see in the documentation that SDL_mixer music functions support the
>>> seeking I need. Is it difficult to add those functions to pygame?
>>> Perhaps there are issues that prevented them initially being added?
>>>
>>> Mark
>>>
>>> On Mon, May 17, 2010 at 1:17 PM, Lenard Lindstrom <len-l@xxxxxxxxx>
>>> wrote:
>>>
>>>>
>>>> Hi Mark,
>>>>
>>>> Pygame uses the SDL_mixer library for music playback. So it all depends
>>>> on
>>>> how SDL_mixer was built and which other libraries are present. The
>>>> possible
>>>> formats are listed in the SDL_mixer documentation here:
>>>> http://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_frame.html
>>>>
>>>> Lenard
>>>>
>>>> Mark Reed wrote:
>>>>
>>>>>
>>>>> What are the supported file formats for the music module?
>>>>>
>>>>> How big a deal would it be to add seek support or at least rewind(
>>>>> milliseconds ) instead of rewind() which returns to the start?
>>>>>
>>>>> Right now I'm stuck working with wxPython's media module that uses
>>>>> windows media player on windows.. ugh.
>>>>>
>>>>> Mark
>>>>>
>>>>>
>>>>
>>>>
>>
>
>