A long running story of the interesting things that occupy the attention and thoughts of McCulloch House: Leigh and Donna McCulloch.

Monday, July 20, 2009

iPhone Dev: Detect if the iPhone's in Silent Mode

I have been writing an application that delivers audio to the user using the AVAudioPlayer, apart of the AVFoundation. If the iPhone is in Silent mode, then the audio isn't heard, however from the applications point of view the audio has been played. If the iPhone is in Silent mode, I want to warn the user so they know that when they press the button that plays sound, they're not going to hear any.

The following function is based on some info I found scattered around on forums, as well as some of my own tinkering to actually get it to work. It will return a boolean indicating if you will be able to play audio using the AVAudioPlayer.

- (bool)isAudioEnabled {
UInt32 cfRouteSize = sizeof (CFStringRef);
CFStringRef cfRoute;
NSString* nsRoute;

AudioSessionGetProperty(
kAudioSessionProperty_AudioRoute,
&cfRouteSize,
&cfRoute);

nsRoute = (NSString*)cfRoute;

return ([nsRoute length] == 0);
}

Note: If the iPhone is in Silent mode with headphones attached, this function will return true, and the AVAudioPlayer should still be able to play audio.

Labels:

Friday, July 17, 2009

Apple Mac Mini Incorrectly Detects Some Monitors

I was recently graced with the frustration of monitor troubles on a Apple Mac Mini. A family member bought a Mac Mini, with the intention of using their previous LCD monitor with it. Save on costs, so on, just how Apple promote their product.

The problem was, after having set it up, the Mac Mini suddenly stopped working with the monitor. The monitor would display a message saying "Out of Range." An hour on the phone with AppleCare turned up nothing more than "Your monitor must not be supported by our product." Which was disappointing to say the least. The monitor, connected via VGA, should work without any sort of support requirements.

I worked out that the Mac Mini must be detecting their LCD monitor as another panel that had a higher maximum refresh rate. Apple's products when automatically detecting a monitor, set the monitor to it's native resolution and maximum refresh rate. Unfortunately for us that meant it was setting the monitor to a refresh rate it couldn't support.

The solution was to use a second working monitor to boot the device up and enable screen sharing. We could then connect their monitor, Detect Displays and wait for the display to go black and say "Out of Range." Then via Screen Sharing, we could go into the Display Settings and set the frequency to 75 which was in range for the monitor.

What was more concerning about this experience was that AppleCare could be of no help to us. It was a simple solution really. My only concern now is if the mini ever decides to "rediscover" what type of monitor is connected and they get stuck with it running at 85 again. Ultimately Mac OS X should, on detecting a monitor, set it to it's lowest refresh rate, like Windows does.

For reference the monitor is a BroMagic LCD 17" VT7V71, the same as a Northgate VT7V71, and many other rebrandings. The monitor was falsly detected as a PV1710, a panel used in a Sun, Advueu and VHT monitor.

This shouldn't be a reason to use only Apple supported monitors. I encourage you if you have any problems like this to perserve. Just because Apple don't support a monitor, doesn't mean that the monitor's manufacturer should have to suffer the sale loss.

Labels:

Monday, July 06, 2009

iPhone: Multiple Recipient SMS's are Sent as MMS

I discovered today that the iPhone doesn't support multiple-recpient SMSs. In fairness, no phone I know really does. Most phones when sending such SMSs will send a single-recipient SMS separately to each recipient. The phones just save you the trouble of typing the message X number of times.

Today I discovered adding a second recipient to an SMS on the iPhone automatically causes the SMS to be sent as an MMS, regardless of whether there is any multimedia in the message being sent.

This is a huge disadvantage in Australia. A large percentage of the people I know aren't able to receive MMSs. For myself it costs more for me to send a single MMS than it does to send two SMSs, and that's the best case scenario assuming I'm not being charged per recipient.

Oh well, I aint going to get hung up on it, but if you send multiple SMSs a lot and you see MMSs on your bill, you'll know why.

A discussion has already been started on this at Apple's Forums.

Labels:

Wednesday, July 01, 2009

Cost-Effective Potatoe w/ Sauce for the Economic Crisis

Tonight I cooked another economic crisis friendly potato based meal, at only $3.26 per serving.

Ingredients (makes 4 Servings)
4 Large (375g) Potatoes$4.46
400g Diced Tomatoes$0.75
184g Champignons$0.99
1 Large Onion$0.40
1 Large Carrot $0.25
1 Small Broccoli $2.00
430g Olives Black Sliced (1 cup of which is needed) $2.14
3 Garlic Cloves $0.20
500g Tasty Cheese (1/10 of which is needed) $4.09
Total Cost for 4 Servings $13.05
Cost per Serving $3.26


Bake the potatoes in the oven, until cooked, probably 90 minutes. About 15 minutes out from the potatoes being ready, mix all the other ingredients together in a pot on the stove until vegetables are cooked to your liking.

* All costs are estimates in Australian Dollars. Homebrand or other cheap brands were used wherever possible.

Labels: