Re: install fails on win2003 32bit
Hi, looks like the test for SDL::Video::display_YUV_overlay(...) is failing. You may force the install, because you wont ever need that. Can you give me some more information so that I may reprodurce that problem? Output of perl -V would be nice. Do you have any other compilers installed (like MS Visual C)? And, your os is a win2k3 server? Cheers, FROGGS Am 19.04.2012 12:22, schrieb Xiao Yafeng: attachment is test output with --verbose. C:\Perl\cpan\build\SDL-2.536-py1NeQperl Build.PL *** !!!WARNING!!! This Release breaks back compatibility support with versions 2.4x and below ** Using 'My::Builder::Windows' class ... Set up gcc environment - 3.4.5 (mingw-vista special r3) Set up gcc environment - 3.4.5 (mingw-vista special r3) Detecting available libraries ... [Alien::SDL] Testing header(s): SDL.h [Alien::SDL] Testing header(s): SDL_mixer.h [Alien::SDL] Testing header(s): SDL_imageFilter.h [Alien::SDL] Testing header(s): SDL_image.h [Alien::SDL] Testing header(s): SDL_ttf.h [Alien::SDL] Testing header(s): SDL_framerate.h [Alien::SDL] Testing header(s): SDL_gfxBlitFunc.h [Alien::SDL] Testing header(s): SDL_gfxPrimitives.h [Alien::SDL] Testing header(s): SDL_rotozoom.h [Alien::SDL] Testing header(s): SDL_Pango.h Writing config_data ... Saving some info to 'notes' ... [Alien::SDL] Testing header(s): execinfo.h, signal.h NOK: (execinfo.h: No such f ile or directory) Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'SDL' version '2.536'
Re: install fails on win2003 32bit
I dont know if that is the problem, but I read: DDraw Status: Disabled On my WinXP box DDraw is enabled, and I can disable it manually. dxdiag, on the third tab. Cheers. Am 22.04.2012 14:03, schrieb Xiao Yafeng: On Sun, Apr 22, 2012 at 7:54 PM, Tobias Leich em...@froggs.de mailto:em...@froggs.de wrote: h, Win2k3 does have DirectX? I'm running out of ideas right now... it does, ;) attachment is dxdiag output, would it help?
AW: How to play an mp3 file from a database
Dear all! It took me quite some time, but I'm moving forward. Here are some screens from my vocabulary trainer: https://picasaweb.google.com/104129024313554475104/Vokabeltrainer?authuser=0 authkey=Gv1sRgCKLyn6SSwIvCgwEfeat=directlink Now I want to play a vocable audio file (that is of course, stored in a database :)). I can't use SDL::Mixer::Music for that, because there is already some background music playing. AFAIK I need to use SDL::Mixer::Samples. I tried it, but there occurred an error when using mp3 files: Cannot load music file [music/terminal.mp3]: Unrecognized sound file type at play_effect.pl line 34 Here is the script: [code] #!perl use strict; use warnings; use utf8; use SDL; use SDL::Event; use SDL::Events; use SDLx::App; use SDLx::Controller; use SDL::Mixer; use SDL::Mixer::Music; use SDL::RWOps; use SDL::Mixer::Samples; use SDL::Mixer::Channels; SDL::init(SDL_INIT_AUDIO); SDL::Mixer::init( MIX_INIT_MP3 | MUS_MP3 ); my $app = SDLx::App-new( title = 'play mp3 effect', exit_on_quit = 1, ); unless( SDL::Mixer::open_audio( 44100, AUDIO_S16SYS, 2, 4096 ) == 0 ) { Carp::croak Cannot open audio: .SDL::get_error(); } my $file = 'music/terminal.mp3'; #my $file = 'music/br_crossing_bell_dop.r.wav'; #my $file = 'music/Windows Logon Sound.wav'; my $sample = SDL::Mixer::Samples::load_WAV( $file ); unless( $sample ) { Carp::croak Cannot load music file [$file]: . SDL::get_error(); } my $playing_channel = SDL::Mixer::Channels::play_channel( -1, $sample, 0 ); $app-run(); SDL::Mixer::Music::halt_music(); SDL::Mixer::close_audio; exit(0); [/code] There also occurred some other errors using .wav files: - Cannot load music file [music/br_crossing_bell_dop.r.wav]: Complex WAVE files not supported at play_effect.pl line 34 - Cannot load music file [music/Windows Logon Sound.wav]: MPEG Layer 3 data not supported play_effect.pl line 34 But, I only want to play mp3 files. Maybe you can hint me at the solution for this problem? How can I play an mp3 file once, e.g. on a button click event? Best regards, Alex -Ursprüngliche Nachricht- Von: breno [mailto:oainikus...@gmail.com] Gesendet: Dienstag, 29. November 2011 06:34 An: Alexander Becker Cc: sdl-devel@perl.org Betreff: Re: How to play an mp3 file from a database On Mon, Nov 28, 2011 at 8:13 PM, Alexander Becker alexanderbec...@gmx.net wrote: Dear all! Hi there! I just tried the example code of the SDL Manual where you play some music. By the SDL manual, I refer to the one that is hidden at the bottom of the sdl.perl.org page, so that you really have to search for it in order to find it - and even then you have to get along with an ugly github interface. There's a new project website under way, but we're missing people to work in it. Please join #sdl in irc.perl.org if you want to help us get it right :) So, in general: Is there a way to play mp3 files? Yup. If your libsdl was compiled with mp3 support, all you have to do (iirc) is set the MIX_INIT_MP3 (for effects) and MUS_MP3 (for audio) flags when you call SDL::Mixer::init(): SDL::Mixer::init( MIX_INIT_MP3 | MUS_MP3 ); then use load_MUS() and play_music() from SDL::Mixer::Music to play mp3 files as background music, or load_WAV() from SDL::Mixer::Samples to play mp3 effects (yes, the function is named load_WAV() but plays different formats too if they're available). The documentation in SDL::Mixer, SDL::Mixer::Music and SDL::Mixer::Samples should be helpful, as some of the test files (t/mixer_music.t comes to mind). And in particular: is there a way to play mp3 files that are in a variable? Or do I have to work with temporary files? Not sure. I *think* SDL::Mixer::quick_load_WAV( $buffer ) might do the right thing. You'll have to test it though. Cheers, breno
Re: install fails on win2003 32bit
Thanks for your reply! On Sun, Apr 22, 2012 at 6:55 PM, Tobias Leich em...@froggs.de wrote: Hi, looks like the test for SDL::Video::display_YUV_overlay(...) is failing. You may force the install, because you wont ever need that. I did, but below script don't work: use SDLx::App; my $app=SDLx::App-new(width=800,height=600,); $app-draw_rect([15,15,100,100],#rect [0,0,255,255],#blue ); $app-update; sleep 5;#sowehavetimetosee! __OUTPUT__ C:\perl sdl_test.pl No available video device at C:/Perl/site/lib/SDLx/App.pm line 109. SDLx::App::new('SDLx::App', 'width', 800, 'height', 600) called at sdl_t est.pl line 24 Can you give me some more information so that I may reprodurce that problem? Output of perl -V would be nice. Do you have any other compilers installed (like MS Visual C)? And, your os is a win2k3 server? OS: win2k3 standard server, other compiler: VS 2005 C:\perl -V Set up gcc environment - 3.4.5 (mingw-vista special r3) Summary of my perl5 (revision 5 version 12 subversion 4) configuration: Platform: osname=MSWin32, osvers=5.2, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='C:/Perl/site/bin/gcc.exe', ccflags ='-DNDEBUG -DWIN32 -D_CONSOLE -DNO_ST RICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLIC IT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fn o-strict-aliasing -mms-bitfields', optimize='-O2', cppflags='-DWIN32' ccversion='', gccversion='3.4.5 (mingw-vista special r3)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksi ze=8 alignbytes=8, prototype=define Linker and Libraries: ld='C:\Perl\site\bin\g++.exe', ldflags ='-LC:\Perl\lib\CORE' libpth=\lib libs=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 - lodbccp32 -lcomctl32 -lmsvcrt perllibs=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshel l32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc 32 -lodbccp32 -lcomctl32 -lmsvcrt libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl512.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -LC:\Perl\lib\CORE' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF USE_SITECUSTOMIZE Locally applied patches: ActivePerl Build 1205 [294981] c6fbf28 [perl #71806] perldb does not setup %dbline with the shebang opt ion -d 1fd8fa4 Add Wolfram Humann to AUTHORS f120055 make string-append on win32 100 times faster a2a8d15 Define _USE_32BIT_TIME_T for VC6 and VC7 007cfe1 Don't pretend to support really old VC++ compilers 6d8f7c9 Get rid of obsolete PerlCRT.dll support d956618 Make Term::ReadLine::findConsole fall back to STDIN if /dev/tty can't be opened 321e50c Escape patch strings before embedding them in patchlevel.h Built under MSWin32 Compiled at Jun 20 2011 18:35:25 @INC: C:/Perl/site/lib/MSWin32-x86-multi-thread C:/Perl/site/lib C:/Perl/lib .
Re: install fails on win2003 32bit
I guess no, Path=C:\Tcl\bin;C:\Program Files\ActiveState Perl Dev Kit 9.1.1\bin\;C:\oracle\p roduct\10.2.0\db_1\bin;C:\Perl\site\bin;C:\Perl\bin;C:\Program Files\Common File s\NetSarang;C:\Program Files\ActiveState Perl Dev Kit 9.0.1\bin\;%JAVE-HOME%\bin \;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI T echnologies\ATI.ACE\Core-Static;C:\strawberry\c\bin;C:\strawberry\perl\site\bin; C:\strawberry\perl\bin;C:\Program Files\GNU\GnuPG\pub;C:\Program Files\Common Fi les\Thunder Network\KanKan\Codecs;C:\Program Files\Git\cmd;c:\Program Files\Micr osoft SQL Server\90\Tools\binn\;C:\Converge\bin;C:\Converge\bin\asm;C:\Program F iles\Gtk+\bin On Sun, Apr 22, 2012 at 7:46 PM, Tobias Leich em...@froggs.de wrote: Is your VS2005 in PATH before perl? Am 22.04.2012 13:40, schrieb Xiao Yafeng: Thanks for your reply! On Sun, Apr 22, 2012 at 6:55 PM, Tobias Leich em...@froggs.de wrote: Hi, looks like the test for SDL::Video::display_YUV_overlay(...) is failing. You may force the install, because you wont ever need that. I did, but below script don't work: use SDLx::App; my $app=SDLx::App-new(width=800,height=600,); $app-draw_rect([15,15,100,100],#rect [0,0,255,255],#blue ); $app-update; sleep 5;#sowehavetimetosee! __OUTPUT__ C:\perl sdl_test.pl No available video device at C:/Perl/site/lib/SDLx/App.pm line 109. SDLx::App::new('SDLx::App', 'width', 800, 'height', 600) called at sdl_t est.pl line 24 Can you give me some more information so that I may reprodurce that problem? Output of perl -V would be nice. Do you have any other compilers installed (like MS Visual C)? And, your os is a win2k3 server? OS: win2k3 standard server, other compiler: VS 2005 C:\perl -V Set up gcc environment - 3.4.5 (mingw-vista special r3) Summary of my perl5 (revision 5 version 12 subversion 4) configuration: Platform: osname=MSWin32, osvers=5.2, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='C:/Perl/site/bin/gcc.exe', ccflags ='-DNDEBUG -DWIN32 -D_CONSOLE -DNO_ST RICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLIC IT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fn o-strict-aliasing -mms-bitfields', optimize='-O2', cppflags='-DWIN32' ccversion='', gccversion='3.4.5 (mingw-vista special r3)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksi ze=8 alignbytes=8, prototype=define Linker and Libraries: ld='C:\Perl\site\bin\g++.exe', ldflags ='-LC:\Perl\lib\CORE' libpth=\lib libs=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 - lodbccp32 -lcomctl32 -lmsvcrt perllibs=-lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshel l32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc 32 -lodbccp32 -lcomctl32 -lmsvcrt libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl512.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -LC:\Perl\lib\CORE' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF USE_SITECUSTOMIZE Locally applied patches: ActivePerl Build 1205 [294981] c6fbf28 [perl #71806] perldb does not setup %dbline with the shebang opt ion -d 1fd8fa4 Add Wolfram Humann to AUTHORS f120055 make string-append on win32 100 times faster a2a8d15 Define _USE_32BIT_TIME_T for VC6 and VC7 007cfe1 Don't pretend to support really old VC++ compilers 6d8f7c9 Get rid of obsolete PerlCRT.dll support d956618 Make Term::ReadLine::findConsole fall back to STDIN if /dev/tty can't be opened 321e50c Escape patch strings before embedding them in patchlevel.h Built under MSWin32 Compiled at Jun 20 2011 18:35:25 @INC: C:/Perl/site/lib/MSWin32-x86-multi-thread C:/Perl/site/lib C:/Perl/lib .
Re: install fails on win2003 32bit
still doesn't work. :( I enabled DDraw, and force install SDL via CPAN. same error: C:\perl sdl_test.pl No available video device at C:/Perl/site/lib/SDLx/App.pm line 109. SDLx::App::new('SDLx::App', 'width', 800, 'height', 600) called at sdl_t est.pl line 24 but anyway, thank very much for your help. On Sun, Apr 22, 2012 at 8:15 PM, Tobias Leich em...@froggs.de wrote: I dont know if that is the problem, but I read: DDraw Status: Disabled On my WinXP box DDraw is enabled, and I can disable it manually. dxdiag, on the third tab. Cheers. Am 22.04.2012 14:03, schrieb Xiao Yafeng: On Sun, Apr 22, 2012 at 7:54 PM, Tobias Leich em...@froggs.de wrote: h, Win2k3 does have DirectX? I'm running out of ideas right now... it does, ;) attachment is dxdiag output, would it help?
AW: How to play an mp3 file from a database
Hi! Ok, now I don't get any error when playing mp3 files from the database, but I don't get any sound either. I updated Alien::SDL to the latest version, that worked. However, SDL itself didn't pass the tests, it's the channels test that fails. So I installed with force, but no change. Is there anything in particular I could do to provide information about the error that occurs with the cannels test? Any information you need to fix this issue (in case it is one)? Best regards, Alex [snip] Test Summary Report --- t\core.t (Wstat: 0 Tests: 28 Failed: 0) TODO passed: 21-22 t\core_video.t(Wstat: 0 Tests: 110 Failed: 0) TODO passed: 57, 59 t\mixer_channels.t(Wstat: 65280 Tests: 35 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output Files=59, Tests=3942, 233 wallclock secs ( 0.94 usr + 0.23 sys = 1.17 CPU) Result: FAIL Failed 1/59 test programs. 0/3942 subtests failed. (C:\strawberry\perl\bin\perl.exe ./Build test exited with 65280) CPAN::Reporter: Test result is 'fail', One or more tests failed. CPAN::Reporter: preparing a CPAN Testers report for SDL-2.536 CPAN::Reporter: this appears to be a duplicate report for the test phase: FAIL SDL-2.536 MSWin32-x64-multi-thread 6.1 Test report will not be sent. FROGGS/SDL-2.536.tar.gz C:\strawberry\perl\bin\perl.exe ./Build test -- NOT OK //hint// to see the cpan-testers results for installing this module, try: reports FROGGS/SDL-2.536.tar.gz Running Build install make test had returned bad status, won't install without force Failed during this command: FROGGS/SDL-2.536.tar.gz : make_test NO [/snip] -Ursprüngliche Nachricht- Von: Tobias Leich [mailto:em...@froggs.de] Gesendet: Sonntag, 22. April 2012 19:31 An: Alex Betreff: Re: How to play an mp3 file from a database Hi Alex, At first, you are on windows and used the prebuklt libSDL binaries shipped with Alien::SDL? If yes, mp3 should be supported, but only files without VBR. So please try a few mp3 files and maybe check how it is encoded. Then, to play an mp3 file from a database, do somethind like: use DBI; use SDL; use SDL::Mixer; use SDL::Mixer::Channels; use SDL::Mixer::Samples; use SDL::RWOps; $dbh-prepare(SELECT music FROM ...); $sth = $dbh-execute(); if( $row = $sth-fetchrow_hashref ) { $rwops = SDL::RWOps-new_const_mem( $row-{music} ); $chunk = SDL::Mixer::Samples::load_WAV_RW( $rwops, 0 ); SDL::Mixer::Channels::play_channel( -1, $chunk, 1 ); } Cheers, FROGGS Am 22.04.2012 18:35, schrieb Alex: Dear all! It took me quite some time, but I'm moving forward. Here are some screens from my vocabulary trainer: https://picasaweb.google.com/104129024313554475104/Vokabeltrainer?auth user=0 authkey=Gv1sRgCKLyn6SSwIvCgwEfeat=directlink Now I want to play a vocable audio file (that is of course, stored in a database :)). I can't use SDL::Mixer::Music for that, because there is already some background music playing. AFAIK I need to use SDL::Mixer::Samples. I tried it, but there occurred an error when using mp3 files: Cannot load music file [music/terminal.mp3]: Unrecognized sound file type at play_effect.pl line 34 Here is the script: [code] #!perl use strict; use warnings; use utf8; use SDL; use SDL::Event; use SDL::Events; use SDLx::App; use SDLx::Controller; use SDL::Mixer; use SDL::Mixer::Music; use SDL::RWOps; use SDL::Mixer::Samples; use SDL::Mixer::Channels; SDL::init(SDL_INIT_AUDIO); SDL::Mixer::init( MIX_INIT_MP3 | MUS_MP3 ); my $app = SDLx::App-new( title = 'play mp3 effect', exit_on_quit = 1, ); unless( SDL::Mixer::open_audio( 44100, AUDIO_S16SYS, 2, 4096 ) == 0 ) { Carp::croak Cannot open audio: .SDL::get_error(); } my $file = 'music/terminal.mp3'; #my $file = 'music/br_crossing_bell_dop.r.wav'; #my $file = 'music/Windows Logon Sound.wav'; my $sample = SDL::Mixer::Samples::load_WAV( $file ); unless( $sample ) { Carp::croak Cannot load music file [$file]: . SDL::get_error(); } my $playing_channel = SDL::Mixer::Channels::play_channel( -1, $sample, 0 ); $app-run(); SDL::Mixer::Music::halt_music(); SDL::Mixer::close_audio; exit(0); [/code] There also occurred some other errors using .wav files: - Cannot load music file [music/br_crossing_bell_dop.r.wav]: Complex WAVE files not supported at play_effect.pl line 34 - Cannot load music file [music/Windows Logon Sound.wav]: MPEG Layer 3 data not supported play_effect.pl line 34 But, I only want to play mp3 files. Maybe you can hint me at the solution for this problem? How can I play an mp3 file once, e.g. on a button click event? Best regards, Alex -Ursprüngliche Nachricht- Von: breno [mailto:oainikus...@gmail.com] Gesendet: Dienstag, 29. November 2011 06:34 An: Alexander Becker Cc: sdl-devel@perl.org Betreff: Re: How to play an mp3 file from a database On Mon, Nov 28, 2011