| Summary: | Add ability to set Sound playback from an offset | ||
|---|---|---|---|
| Product: | SDL_mixer | Reporter: | Sebastian Gray <sebastiangray> |
| Component: | misc | Assignee: | Ryan C. Gordon <icculus> |
| Status: | ASSIGNED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | API change | ||
| Priority: | P2 | ||
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Other | ||
| URL: | http://www.sf.net/projects/opensebj | ||
|
Description
Sebastian Gray
2009-02-14 15:50:35 UTC
Just to be clear: are you using SDL_sound or SDL_mixer (or just SDL by itself)? --ryan. I use Mixer and Sound. I don't / didn't know you could use them independently of each other and achieve the same result however I am also not sure if any of this is to do with the SDL.Net wrapper I am using. I'll put in a sample of the code that I am using so you can see what I use, hope this makes it clearer: // I open the mixer and define channels Mixer.Open(44100, AudioFormat.Default, (int)SoundChannel.Stereo, 1024); Mixer.ChannelsAllocated = channels * subChannels; // Then load samples in to an array of Sounds aSound[position] = new Sound(fileName); // Then find a free channel for the sample and play the sample ch[position][p].Play(aSound[position], false); // I use the instance of the sound directly to control behaviour once playing has started. aSound[position].Stop(); Hope that clarify's what you were looking for, in effect I was hoping for a method on the Sound class like aSound.SetPosition(Position); just as I use the stop or volume methods to control playback. Thanks, let me know if you need anything more. Changing product: pretty sure this was meant to be the SDL_mixer add-on library, not the SDL_sound add-on. --ryan. This seems pretty useful, although you can simulate this yourself by creating a new Mix_Chunk structure that points at the data of another chunk at an offset. |