Re: $surface->pixel is slow + audio data chunks

[email protected] ("Brian Cassidy")
Newsgroups perl.sdl.devel
Message-ID <[email protected]>
David,

Thanks for your reply!

On 8/11/07, David J. Goehrig <[email protected]> wrote:
> It may require modifications to the version of SDL_Perl that you're
> running but SDL::Surface->pixels can be made to return a string of
> binary image data.  You can then apply unpack on it, and run it through
> map, or a regular expression, etc.

I noticed that method, but it always returned an empty string -- do
you have any more details on how i can enable that method?

> Yeah it is possible to play PCM data.  But it is platform dependent.
> Some threading issues occur on platform that run audio in a separate
> thread.  The audio callback code, however, can be a pain to work with in
> Perl, because of re-entrancy issues even on a suitable platform.
> Currently, the box I'm on doesn't like the audio code, and I haven't
> played with it in over a year.

Not having audio is okay as this is just for fun...

-Brian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.