From: Robert R. <ro...@fr...> - 2004-06-23 13:08:38
|
Anyone there, with some more insight into object Perl programming te help me on this one ? Thanks in advance, Robert. ----- Original Message ----- From: "Robert Rozman" <ro...@fr...> To: <mis...@li...> Sent: Sunday, June 20, 2004 10:23 PM Subject: [misterhouse-users] Sending object to subroutine ? > Hi, > > I'm having problems on running multiple instances of Alsaplayers under MH. > I'm obviously doins something wrond due to lack of my knowledge in object > programming. > > I have code like this : > > $players[1]=new AlsaPlayer("main",'hw:1,0'); > $players[2]=new AlsaPlayer("kids",'dmixer'); > > sub mp3_play { > my ($file, $player) = @_; > $player->clear(); > $player->shuffle("on"); > ... > } > > > Now I call this with: > > &mp3_play($file,\$players[1]); > > And I get error of: > > "Can't call method start on unblessed reference ..." > > players[1] is defined object but obviously I must do something more to be > allowed to transfer object to subroutine to perform at. > > Any guidance ? > > Thanks in advance, > > Robert. > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference > Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer > Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA > REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND > ________________________________________________________ > To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365 > |