"fixing" primitiveBeep for cocoa VMs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

"fixing" primitiveBeep for cocoa VMs

Mariano Martinez Peck
 
Hi Esteban. I was just trying to see why primitiveBeep was not working for Cocoa VMs and I found that ioBeep() was empty. I first tried to copy the code from carbon VMs (using SysBeep) but it seems not to be present anymore in Cocoa. Then I found the new way was using NSBeep(). So I modified sqSqueakMainApplication+sound.m  to look like:


#import "sqSqueakMainApplication+sound.h"

@implementation sqSqueakMainApplication (sound)
- (void) ioBeep {
   
    NSBeep();
    return 0;
   
}
@end


And now it seems to be working.  I have never commit anything in platform code so I have no idea whether this is correct or not.

Thanks

--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: "fixing" primitiveBeep for cocoa VMs

EstebanLM
 
Hi Mariano,

I already fixed that :)... it is in latest sources (not yet merged with blessed). Problem is that is not yet distributed because jenkins is not working (all processes hangs after awhile)

best,
Esteban

El 12/01/2012, a las 1:04p.m., Mariano Martinez Peck escribió:

Hi Esteban. I was just trying to see why primitiveBeep was not working for Cocoa VMs and I found that ioBeep() was empty. I first tried to copy the code from carbon VMs (using SysBeep) but it seems not to be present anymore in Cocoa. Then I found the new way was using NSBeep(). So I modified sqSqueakMainApplication+sound.m  to look like:


#import "sqSqueakMainApplication+sound.h"

@implementation sqSqueakMainApplication (sound)
- (void) ioBeep {
   
    NSBeep();
    return 0;
   
}
@end


And now it seems to be working.  I have never commit anything in platform code so I have no idea whether this is correct or not.

Thanks

--
Mariano
http://marianopeck.wordpress.com