Post

Replies

Boosts

Views

Activity

Reply to Swift Playgrounds: Learn to Code 1: Roll Right Roll Left Infinitely Walking Around
I entered your code and ran it. Byte doesn't stop walking because Byte isn't done. There's a little scoreboard at the top left of the scene - it shows Bytes has collected 1/1 gems and tripped 0/1 switches. Try to split your code into functions which do only one thing, and are well named. For instance, rename 'checker' to 'checkSwitch' and have it only change the switch state if necessary, rather than sometimes changes switch state, and sometimes move forward. In this exercise, the path is predictable (you can see it), so your steps can be a list of instructions, with no branches and no conditionals.
Apr ’22
Reply to Determine Core Audio Parameter Type
from AudioToolbox/AudioUnitParameters.h, CF_ENUM(AudioUnitParameterID) { // Global, LinearGain, 0->1, 1 kHALOutputParam_Volume = 14  }; AudioUnitSetParameter is declared in AudioToolbox/AUComponent.h, here you will also find: typedef Float32 AudioUnitParameterValue;
Topic: Media Technologies SubTopic: Audio Tags:
Mar ’22
Reply to xcode doesn't work
can you see Xcode in Activity Monitor? How about the running indicator beneath its icon in the Dock? If you open the Xcode package you can run the Contents/MacOS/Xcode inside it from the command line. The output may give you a clue. Or, look at the Console log when you try to launch the application.
Jan ’22
Reply to Differences between USB Flash and USB HDD
what criteria do you want to use? What criteria are Windows and Linux using? You can find out if a disk is removable, and what connection method is used for it. Check out the IORegistry, use ioreg at the command line, or IORegistryExplorer from the developer tools. You can walk the IORegistry tree programmatically to pull out the details you may need. Also, why do you need to know? They're both mass storage devices...
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’22
Reply to Swift Playgrounds: Learn to Code 1: Roll Right Roll Left Infinitely Walking Around
I entered your code and ran it. Byte doesn't stop walking because Byte isn't done. There's a little scoreboard at the top left of the scene - it shows Bytes has collected 1/1 gems and tripped 0/1 switches. Try to split your code into functions which do only one thing, and are well named. For instance, rename 'checker' to 'checkSwitch' and have it only change the switch state if necessary, rather than sometimes changes switch state, and sometimes move forward. In this exercise, the path is predictable (you can see it), so your steps can be a list of instructions, with no branches and no conditionals.
Replies
Boosts
Views
Activity
Apr ’22
Reply to Determine Core Audio Parameter Type
from AudioToolbox/AudioUnitParameters.h, CF_ENUM(AudioUnitParameterID) { // Global, LinearGain, 0->1, 1 kHALOutputParam_Volume = 14  }; AudioUnitSetParameter is declared in AudioToolbox/AUComponent.h, here you will also find: typedef Float32 AudioUnitParameterValue;
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
Mar ’22
Reply to How to get greyscale video image from camera?
Your description isn't quite clear, but it sounds like you are getting some portion of the complete frame. Try this - in setupCamera, use your own serial queue, rather than the main queue. There's an example here: https://developer.apple.com/documentation/vision/tracking_the_user_s_face_in_real_time/ hth, Stuart
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to xcode doesn't work
can you see Xcode in Activity Monitor? How about the running indicator beneath its icon in the Dock? If you open the Xcode package you can run the Contents/MacOS/Xcode inside it from the command line. The output may give you a clue. Or, look at the Console log when you try to launch the application.
Replies
Boosts
Views
Activity
Jan ’22
Reply to Differences between USB Flash and USB HDD
what criteria do you want to use? What criteria are Windows and Linux using? You can find out if a disk is removable, and what connection method is used for it. Check out the IORegistry, use ioreg at the command line, or IORegistryExplorer from the developer tools. You can walk the IORegistry tree programmatically to pull out the details you may need. Also, why do you need to know? They're both mass storage devices...
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jan ’22