Re: [MacRuby-devel] MacRuby-devel Digest, Vol 36, Issue 42
Shaun August, I have previously come across the same suggestion you mentioned: using QTKit's QTMovie class for playing/looping audio. After implementing the QTKit approach which you can see here: https://github.com/razic/virus/blob/master/loop.rb the pause between each loop iteration was either the same or worse than a basic NSSound object with loops = true. Neither the NSSound or the QTMovie are sufficient for seamless looping. However, the Apple PlayFile example which I built/compiled in Xcode DOES loop perfectly seamless. How come I can't access a lot of the methods you see in the PlayFile example, even after loading the necessary frameworks? (I have BridgeSupport 2) I hope I'm simply doing something wrong. Would really appreciate anyone who can provide any sort of insight into converting PlayFile to macruby. PlayFile can be found here: http://developer.apple.com/library/mac/#samplecode/PlayFile/Introduction/Int... Thanks in advance, Zak On Wed, Feb 23, 2011 at 3:18 PM, <macruby-devel-request@lists.macosforge.org> wrote:
Send MacRuby-devel mailing list submissions to macruby-devel@lists.macosforge.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel or, via email, send a message with subject or body 'help' to macruby-devel-request@lists.macosforge.org
You can reach the person managing the list at macruby-devel-owner@lists.macosforge.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of MacRuby-devel digest..."
Today's Topics:
1. Re: loop audio file seamlessly (Zachary Kaplan) (Shaun August) 2. NoMethodError (ib_outlets) (Rob Gleeson) 3. Re: NoMethodError (ib_outlets) (Robert Payne) 4. Re: NoMethodError (ib_outlets) (Laurent Sansonetti) 5. Re: 0.9 update (Laurent Sansonetti) 6. Re: NoMethodError (ib_outlets) (Rob Gleeson)
----------------------------------------------------------------------
Message: 1 Date: Wed, 23 Feb 2011 10:13:57 -0800 From: Shaun August <saugust@me.com> To: "MacRuby development discussions." <macruby-devel@lists.macosforge.org> Cc: "macruby-devel@lists.macosforge.org" <macruby-devel@lists.macosforge.org> Subject: Re: [MacRuby-devel] loop audio file seamlessly (Zachary Kaplan) Message-ID: <78467B80-E4AB-407D-80BF-97CD162F262A@me.com> Content-Type: text/plain; CHARSET=US-ASCII
Hi Zak,
Try looking at the QTMovie. It is much more reliable and handles audio well. If you need a sample I can post something tonight.
Thank you,
On 2011-02-22, at 10:27 PM, Zachary Kaplan <razic@viralkitty.com> wrote:
hello all,
i received a suggestion from another member to check out the PlayFile example in the audio toolbox examples.
while this was very helpful in putting me on the right track for basic low level audio manipulation, there are some additional related issues i've encountered in trying to port over the example to macruby.
most notably, i don't seem to have some of the most important methods available such as AudioFileOpenURL.
perhaps (most likely) i am just doing something wrong. i have bridge support 2.
also if anyone has any macruby audio examples, i'd love to see what others have done.
could anyone else provide some more insight?
thanks in advance -zak _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
------------------------------
Message: 2 Date: Wed, 23 Feb 2011 21:57:35 +0000 From: Rob Gleeson <rob@flowof.info> To: "MacRuby development discussions." <macruby-devel@lists.macosforge.org> Subject: [MacRuby-devel] NoMethodError (ib_outlets) Message-ID: <64937216-981F-4469-BB80-C76C98E78EF8@flowof.info> Content-Type: text/plain; charset=us-ascii
Hi
I'm giving my first MacRuby application a shot, and I'm sort of blind to be honest :) I've added a NSWindowController, attached it to my window, saved the classes in Interface Builder, but when I build and run my application, I get a NoMethodError for 'ib_outlets'.
My controller inherits from NSResponder.
The stranger thing is, I guess, when I remove any code referencing ib_outlets, the same error is raised again. NoMethodError.
Any advice? What class defines ib_outlets? Am I doing it completely wrong? Thanks.
-- Rob
------------------------------
Message: 3 Date: Thu, 24 Feb 2011 11:08:59 +1300 From: Robert Payne <robertpayne@me.com> To: "MacRuby development discussions." <macruby-devel@lists.macosforge.org> Subject: Re: [MacRuby-devel] NoMethodError (ib_outlets) Message-ID: <F8170B8F-E4E2-4849-BFCB-C431C1378152@me.com> Content-Type: text/plain; CHARSET=US-ASCII
Hey Rob,
Could you by chance upload the source to github or somewhere? It'd be a lot easier to help seeing the whole picture.
-Robert
On Feb 24, 2011, at 10:57 AM, Rob Gleeson wrote:
Hi
I'm giving my first MacRuby application a shot, and I'm sort of blind to be honest :) I've added a NSWindowController, attached it to my window, saved the classes in Interface Builder, but when I build and run my application, I get a NoMethodError for 'ib_outlets'.
My controller inherits from NSResponder.
The stranger thing is, I guess, when I remove any code referencing ib_outlets, the same error is raised again. NoMethodError.
Any advice? What class defines ib_outlets? Am I doing it completely wrong? Thanks.
-- Rob
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
------------------------------
Message: 4 Date: Wed, 23 Feb 2011 14:13:51 -0800 From: Laurent Sansonetti <lsansonetti@apple.com> To: "MacRuby development discussions." <macruby-devel@lists.macosforge.org> Subject: Re: [MacRuby-devel] NoMethodError (ib_outlets) Message-ID: <E5824773-93C4-4EDE-8FBC-64DA6CD22683@apple.com> Content-Type: text/plain; charset="us-ascii"
Hi Rob,
ib_outlets is an old RubyCocoa craft that is not supported in MacRuby since a long time. You can define IB outlets using the attr_writer or attr_accessor methods. You can define IB actions by defining methods accepting a single argument, named 'sender'.
There are lots of documentation about this on the net. Here is a pointer to a nice tutorial that you might be interested to follow.
http://blog.phusion.nl/2010/03/12/creating-our-very-first-mac-application-wi...
Laurent
On Feb 23, 2011, at 1:57 PM, Rob Gleeson wrote:
Hi
I'm giving my first MacRuby application a shot, and I'm sort of blind to be honest :) I've added a NSWindowController, attached it to my window, saved the classes in Interface Builder, but when I build and run my application, I get a NoMethodError for 'ib_outlets'.
My controller inherits from NSResponder.
The stranger thing is, I guess, when I remove any code referencing ib_outlets, the same error is raised again. NoMethodError.
Any advice? What class defines ib_outlets? Am I doing it completely wrong? Thanks.
-- Rob
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
participants (1)
-
Zachary Kaplan