Casting.
Blitz3D Forums/Blitz3D Programming/Casting.
| ||
Is there anyway to cast types to different types in Blitz? As in, if I read a sound file into a memory buffer (Bank), how can I get that played through "PlaySound"? Thanks in advance for any suggestions! |
| ||
This can't be done natively in blitz. Handles in blitz aren't simple pointers to the raw data, for starters. You may be able to cobble together some kind of memory hack using a DLL, but that's just dirty. :) |
| ||
Gah! Soooo don't understand how to use the DLL stuff!! :( |
| ||
Maybe if you say why you want to be able to do this kind of stuff, we can suggest alternative methods. For example, if you want to load sound data into a bank to alter it, you can, then just save the data back out to a sound file and load and play it in the usual way. |
| ||
I need live control over the position of the sound to be played back. I also need to be able to play the sound in reverse at different pitches etc. The ChannelPitch stuff doesn't seem to work properly in reverse - doesn't play the entire sample. |