Tag Archives: Mac

Bluetooth sound quality issues in OSX

I love the wireless technologies, I truly adore them. One thing that bothers me about Bluetooth though is sound glitches and jumps – it works pretty for some time, and then all of a sudden it starts twitching, small fractions of it missing. Minor, but very annoying.

This is actually broader issue than OSX – for instance, no smartphone works with a Bluetooth headset perfectly if I keep the phone in my jeans pocket. It all goes well and nice till it gets jumpy out of the blue – and then back normal again.

Now with Mac it’s a bit different – at some point sound starts twitching, and it goes on then till I re-initiate Bluetooth connection. And it was kinda alright till it got me. One speculation I found over the Internet was connection bitrate is too low and needs to be raised with this command line:

defaults write com.apple.BluetoothAudioAgent “Apple Bitpool Min (editable)” 60

because default is 40. So I have tried that, it didn’t help much, so I assumed that’s not the right solution and forgot about it. And after a while I did what I should have done right away – I restarted Bluetooth on Mac. And… speaker stopped working at all – it connected, but failed with something like “compressed stream is unacceptable”. Since I forgot I mangled Bluetooth settings, first thought was my speaker broke. And it was kinda alright (it has wired input, quite old and I don’t use it every day) till it got me.

So I googled up the error message and results stroke me with remembrance. Changing the value in aforementioned command to 53 (that was highest suggested working rate) and… it’s all good now! Can’t say about twitches – they were sporadic and never ocurred right away – but at least I got it back working.

One note: that command is for user space, don’t run it with sudo (no harm there, just wouldn’t work).

Disable OSX Mail app from popping up on calendar events

As (I believe) many OSX fellas, I connect my Google calendar with OSX calendar to receive all the notification in pop-up form – and just to have all the event a tap away. However when event reminder fires, OSX Mail app starts jumping in anxiety, yelling “Oh! Oh! You forgot to add your email! Do it, do it now!” – and that’s annoying because, well, I don’t use that app and I have no intention to.

The solution is simple (for a downside, read on):

sudo chmod 000 /Applications/Mail.app/Contents/MacOS/Mail

that’d just disable Mail app from being able to launch. It’s dirty, yes – but it’s that famous “good enough” kung-fu. If you need to get Mail app back to launchable state, well, just undo the spell with 755 permissions.

Now on that downside: you have to do this with each system update, because either app access rules or file itself get restored on update – that’s how I got to writing this, because I faced the problem again after an update. How to cope with it? Well, just do it again – updates are seldom enough. That’s how I’m gonna deal with it anyway.

Remove duplicates from iTunes playlist

UPDATE: Script could be found on BitBucket now – https://bitbucket.org/hydralien/tools/src/8e751cbd676eb7c2604d4e2e25633f9291e631f0/apple/iTunesDedupe.applescript?at=master

If one adds music to iTunes playlist by dragging them files in (without moving to iTunes library), one might end up with a fair number of duplicates. And one might get frustrated about it.

ALso, one might even go and solve it, and then share for other suffering fellas – like this: http://hydralien.net/storage/apps/nodupes.dmg

NOTE: playlist should be sorted by name. And it makes sense to export a playlist for backup reasons – for I give no warranties here.

Code is included to the image – but let it rest below as well. FTR to launch/edit it, run AppleScript Editor (use Spotlight) – it’s simple but nice tool to write AppleScript apps.

 

tell application "iTunes"
display dialog "Gimme playlist name" default answer ""
set plName to the text returned of the result
set curPl to user playlist plName -- current playlist
set dupes to {}
set prevTrack to {"", 0}
set trackNo to 1
repeat with aTrack in every track of curPl
set curTrack to {get name of aTrack, get time of aTrack}
if curTrack = prevTrack then
set the end of dupes to trackNo
end if
set trackNo to trackNo + 1
set prevTrack to curTrack
end repeat
set dupePos to 0
repeat with dupe in dupes
set rmTrack to dupe - dupePos
-- log rmTrack
delete track rmTrack of curPl
set dupePos to dupePos + 1
end repeat
set dialogLine to "Deleted " & (count dupes) & " dupes in " & plName & " playlist"
display dialog dialogLine buttons {"OK"}
end tell