Re: Beep ( duration, frequency )
Re: Beep ( duration, frequency )
- Subject: Re: Beep ( duration, frequency )
- From: Charles Srstka <email@hidden>
- Date: Wed, 23 Sep 2015 22:07:11 -0500
> On Sep 23, 2015, at 7:40 PM, Jens Alfke <email@hidden> wrote:
>
>> On Sep 23, 2015, at 4:41 PM, Raglan T. Tiger <email@hidden <mailto:email@hidden>> wrote:
>>
>> I want code that is this simple on Windows:
>>
>> DWORD freq = 587;
>> if(!something) freq = 659;
>> if(another) freq = 523;
>> Beep(freq, 150);
>
> No, there’s no simple API for this. This API in Windows is a relic of the early PC days when getting any kind of audio out was amazing, even if it was crap square-waves. I remember demos on the Apple II that would use APIs like this to play “Happy Birthday” or something.
>
> (It’s kind of like you’re asking “where’s the Cocoa API to fill the whole screen with red”.)
The original Mac had an API just like that, actually, way back in the 80s. It stopped working sometime in the 90s, though; I think the original black-and-white models actually had a separate piece of hardware for generating waveforms, and they stopped including it somewhere in the 68020/68030 era. Pretty annoying as a kid when the family computer got upgraded and suddenly the sound on my games wouldn’t play anymore. :-)
Charles
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden