| Summary: | MP3 Audio Streaming feature support in SDL_Mixer - Play mp3 from remote (HTTP/FTP) | ||
|---|---|---|---|
| Product: | SDL_mixer | Reporter: | Amit Jain <amit.jain83> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED WONTFIX | QA Contact: | Sam Lantinga <slouken> |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | amit.jain83 |
| Version: | 2.0.0 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Attachments: | New API has been added to support mp3 music play from remote (HTTP/FTP) | ||
Created attachment 2225 [details]
New API has been added to support mp3 music play from remote (HTTP/FTP)
Extension API has been provided in SDL_mixer to support mp3 streaming.
Mix_Music *Mix_LoadMUS_Remote(int socketDescriptor, Mix_MusicType type)
[IN] - socketDescriptor - Socket descriptor - TCP Socket, user will create SockFD from URL where mp3 file is located.
[IN] - type - Type of music.
[out] - returns Mix_Music structure pointer on success & NULL if fail.
This API is responsible for following things.
1. Load Music type = mp3 from Remote & return Mix_Music structure.
2. Mix_Music structure pointer will be used to play remote mp3 using mixer APIs.
Result: Game developers can now directly use SDL_mixer APIs to play/pause/resume mp3 from HTTP/FTP (streaming) using above API.
Hello Sam & Ryan Please review & provide your Feedback. Please let me know for any doubt. Thanks Amit Jain Probably a better way to handle this is to create a new type of SDL_RWop that wraps a network socket, that way all the loaders would be able to use it seamlessly. That seems like it might be a good thing to put in the core SDL library. |
Current Limitation: 1. There is no way to play mp3 file from HTTP/FTP using SDL_mixer API. 2. Game Developers have to use multiple APIs of smpeg library to play/pause/resume mp3 from remote (HTTP/FTP). There should be an API in SDL_mixer that can be used by Game developer to play mp3 file from remote (HTTP/FTP).