Re: [MacRuby-devel] NSLocaliszed* functions missing

2010-05-19 Thread Ed
Hi Dave,

NSLocalizedStringFromTable is a C macro defined in NSBundle.h that wraps a call 
to localizedStringForKey:value:table:. 

You can call the localize method directly by using something like:

 NSBundle.mainBundle.localizedStringForKey('key', value:'value', 
table:'table').

HTH,
Ed

On May 19, 2010, at 9:25 AM, Dave Baldwin wrote:

> With macruby 0.6 when I try and use NSLocalizedStringFromTable I get the 
> following:
> 
> ~> macirb
> irb(main):001:0> framework 'cocoa'
> => true
> irb(main):002:0> NSLocalizedStringFromTable('', '', '')
> NoMethodError: undefined method `NSLocalizedStringFromTable' for main:TopLevel
>   from /Users/dave/(irb):2:in `'
> 
> I believe NSLocalizedStringFromTable is part of the Foundation framework.
> Also all the other NSLocalized* functions seem to be missing.
> 
> Dave.
> 
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #376: The second 'pointer' of a double pointer type is ignored

2010-06-15 Thread Ed
Thanks Martin, that explains it.

Ed

On Jun 14, 2010, at 7:07 PM, MacRuby wrote:

> #376: The second 'pointer' of a double pointer type is ignored
> -+--
> Reporter:  m...@…   |   Owner:  lsansone...@…
> Type:  defect   |  Status:  new  
> Priority:  blocker  |   Milestone:   
> Component:  MacRuby  |Keywords:   
> -+--
> 
> Comment(by martinlagarde...@…):
> 
> What you can add in `MusicPlayer.bridgesupport` is information about music
> player being an opaque struct. Between structs and enums, I added the
> following line:
> {{{
> #!xml
> 
> }}}
> 
> Then when I run the script:
> {{{
> $> macruby t.rb
> ^{OpaqueMusicPlayer}
> $>
> }}}
> 
> -- 
> Ticket URL: <http://www.macruby.org/trac/ticket/376#comment:5>
> MacRuby <http://macruby.org/>
> 
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #376: The second 'pointer' of a double pointer type is ignored

2010-06-15 Thread Ed
Go ahead and close it out as everything's working fine now.  The problem was 
due to bridgesupport ignorance on my part anyways.

Ed

P.S.  Sorry about mangling you name, will get it right next time!


On Jun 15, 2010, at 1:10 PM, Thibault Martin-Lagardette wrote:

> You are very welcome :-).
> 
> I know it can be tricky, because one would tend to believe the bridgesupport 
> files are all correct, but there is definitely a lot of area for improvement 
> (which is being worked on ;-))
> 
> Can I close the bug, if everything is working?
> 
> P.S.: My first name is actiually Thibault :P
> 
> -- 
> Thibault Martin-Lagardette
> 
> 
> 
> On Jun 15, 2010, at 08:10, Ed wrote:
> 
>> Thanks Martin, that explains it.
>> 
>> Ed
>> 
>> On Jun 14, 2010, at 7:07 PM, MacRuby wrote:
>> 
>>> #376: The second 'pointer' of a double pointer type is ignored
>>> -+--
>>> Reporter:  m...@…   |   Owner:  lsansone...@…
>>>   Type:  defect   |  Status:  new  
>>> Priority:  blocker  |   Milestone:   
>>> Component:  MacRuby  |Keywords:   
>>> -+--
>>> 
>>> Comment(by martinlagarde...@…):
>>> 
>>> What you can add in `MusicPlayer.bridgesupport` is information about music
>>> player being an opaque struct. Between structs and enums, I added the
>>> following line:
>>> {{{
>>> #!xml
>>> 
>>> }}}
>>> 
>>> Then when I run the script:
>>> {{{
>>> $> macruby t.rb
>>> ^{OpaqueMusicPlayer}
>>> $>
>>> }}}
>>> 
>>> -- 
>>> Ticket URL: <http://www.macruby.org/trac/ticket/376#comment:5>
>>> MacRuby <http://macruby.org/>
>>> 
>>> ___
>>> MacRuby-devel mailing list
>>> [email protected]
>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>> 
>> ___
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] loop audio file seamlessly

2011-02-20 Thread Ed
Look at the PlayFile sample code in the Core Reference Library for an example 
of how to loop an audio file.

Ed

On Feb 20, 2011, at 9:21 PM, Zachary Kaplan wrote:

> hello all,
> 
> i would like to loop an audio file seamlessly.
> 
> i have a file that, when looped in logic or garage band, sounds perfect.
> 
> an nssound object with "loops = true" in macruby using the same file
> however, has an audible pause between each iteration, meaning our loop
> is not seamless, ultimately ruining our users' audio enhanced
> experience.
> 
> could somebody please help me into the right direction :}
> 
> thanks in advance,
> -zak
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] loop audio file seamlessly (Zachary Kaplan)

2011-02-24 Thread Ed Hynes
Hi Zak,

I'm running MacRuby revision 5236 with BridgeSupport Preview 3 and the 
following script works fine:

framework 'AudioToolbox'

url = NSURL.fileURLWithPath "/test/loops/Lounge Vibes 01.caf"
audioFileID_ptr = Pointer.new_with_type '^{OpaqueAudioFileID}'
p AudioFileOpenURL url, KAudioFileReadPermission, 0, audioFileID_ptr


HTH,
Ed

On Feb 23, 2011, at 1:27 AM, Zachary Kaplan 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
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel