Seeking pointers for coding with Mac::Sound or other Perl packages

Greetings and best wishes.
I am working on an experimental/recreational VoIP app using Net::SIP. All of the SIP stuff is easy and I am sending/receiving calls to/from my VoIP provider, no problem. I am to the point where I want to hook in live input from the system mic and/or play output directly to the speaker. I am i need of some pointers to get started. Currently I am using VLC to speaker the output and have no Mic input.
I have Mac::Sound (and the full Mac::Carbon) loaded, but I seem to be having trouble tracking down simple doc and examples. I can play an example sound file (Scream.rsrc) using SndPlay(0, $snd, 0), but I don't know the format of the resource file. And really, I don't want to play files, I want to stream my output (ULAW or decoded ULAW) to the speaker, and send the live Mic input to the call. Can anyone help me with some pointers to get started?
Ultimately, I will want to use a USB headset rather than the onboard mic and speaker.
Thanks.

Thanks for the advice about the obsolete status of Carbon (and perl Mac::Carbon). However I don't see any perl packages to interface to Core Audio. As I am experimenting, and as Carbon seems to work great on my 10.4.11 iMac, here is what I have done. To play an 8000 khz Ulaw clip held in some scalar, the following simple fragment will suffice:
use Mac::Memory;
use Mac::Sound;
my $ULAWCOMPHDRSIZE = 84;
my $RATE8KHZ = 8000;
my $MONO = 1;
my $BITS8PERSAMPLE = 8;
my $snd = <some ulaw encoded sound data>;
$hand = NewHandle($ULAWCOMPHDRSIZE);#setup won't grow handle size so don't $h = new Handle
Mac::Sound::SetupSndHeader($hand, $MONO, $RATE8KHZ, $BITS8PERSAMPLE,
kULawCompression, kMiddleC, length($snd));
$hand->append($snd); # the Handle methods all take care of size and resize for you
SndPlay($chan, $hand, 0); # sync play
You can async the play ( SndPlay($chan, $hand, 1) ) just fine, but unfortunately, the callback functionality is not supported. But as I am streaming well timed RTP buffers, I can handle the async complications in other ways.
I haven't started on recording from the MIC yet, but I expect it can be accomplished similarly.
Thanks.

Similar Messages

  • Doesn't play songs, "itunes is not configured for use with mac-formatted"??

    Hi, new ipod shuffle. Seems to charge fine, all indicator lights function as expected. Everything looks fine in itunes. But it doesn't play songs. I have the most recent versions of itunes and the ipod software. Re-set, updated, and restored, nothing works. Even restored using the restore utility. Re-started computer. Checked for volume control. Won't play songs. Tried different file types. Songs play fine from itunes library and from the device's library within itunes. Tried different headphones. Hooked it up to computer speakers. Turning volume all the way up on device and speakers, heard some very faint rhythmic static, so my guess is the jack socket (or whatever you call it) is just messed up, but it seems weird that it can transfer power and data to the device but doesn't work for sound...
    The only other issues that have come up is that the drive disappears in explorer once it syncs with itunes. Other people who've noticed this seem to have completely different problems so I don't think it's related.
    Also, I have MacDrive on my computer. And when it starts up with the ipod plugged in, MacDrive offers the message "Itunes is not configured for use with Mac-formatted ipods." It offers to automatically reconfigure itunes so it can read mac-formatted ipods. Since I've restored the device, I don't see why formatting should be an issue so I say "no."
    Should I try letting macdrive do its format thing? Should I try formatting the ipod disk on the My Computer menu? Or should I just email apple and tell them the jack's busted?
    Thanks for any thoughts!

    Well, I have had my iPod for about 3 years, it is a 4th generation non-video 40 GB. One day it just stopped working, and now it does not play any songs. when I turn it on it makes this odd whirring sounds that computers make when they try really hard to do something. I cannot charge it, and it is not recognized by iTunes. Also when I turn it on, I get the apple.com/ipod/support (or whatever it is) screen. Needless to say, my warranty is expired, and so I cannot do anything for it except get a new battery, or buy a new one. Is there any way to fix this problem, or anyone out there who is experiencing the same thing?
    I'm having the exact same problem with my wife's iPod. However it will play about 3 seconds of a song and go onto the next song.
    If there is anyone out there that can help please do!
      Windows XP  

  • Best POS system for use with Mac?

    What is the best POS system for use with Mac?  Using Quickbooks and paper invoices and inventory.  Would like to upgrade to POS system.

    Ideally it is best to have seperate (discreet) EHD's for a PC and Mac due to their differences in HD formatting. However, this is not always feasable but there are alternative solutions availble. Among those are:
    Creating and useing a Dropbox account that can be shared by PCs, Macs, IOS and Android devices. Dropbox allows for 2GB of free storage and additional storage is available for a small monthly fee.
    Another possiblity is formating an EHD so that it may be shared by both a PC and Mac, this format is FAT 32. The downside of doing this is the size of the files written to the HD are limited to 4GB.

  • Switching to AT&T Cingular - best phone for use with Mac and iSync

    Dear Friends,
    I am finally about to be free from Sprint's poor customer service. I will be switching to AT&T / Cingular. (Not quite ready to buy an iPhone, but don't want to be locked into a 2 year contract with another provider).
    I want to use Apple's iSync. I have reviewed the list of compatible devices and scanned the forums for related topics.
    I'm still left wondering:
    What is the best phone to get with AT&T for use with iSync?
    I would like to sync contacts both ways. If possible, syncing cal events and to-dos would be nice, but not as important as contacts.
    I prefer small flip phones. I don't plan to buy the Media pack service that includes text, web, etc. Instead, I will use the phone for calls and occassional text messages.
    Sound quality and the ease of use are the most important features for me. I prefer raised keys to the flat keypads, but could give on this if need be.
    Finally, using the phone as a modem with my laptop would be nice, but is not essential.
    Thanks so much for any help you can offer.
    David

    I am facing the exact same question regarding, e.g., the Nokia 6126. There are several references:
    1. Go to the Nova Media web site and look at their new product, Fone Link. Or their iSynch Plugins
    2. One of the forum threads references, http://www.macosxhints.com/article.php?story=20060915154526806
    3. Another link I found http://soapbox.co.nz/past/2007/4/9/nokia-6126-and-isync-revisited/
    But what I don't yet understand is whether or not any of these suggestions/solutions are affected by the carrier. My understanding is that the 6126 is the North America Version of the 6131. But I talked to ATT/Cingular support yesterday and they make some modifications to the phone software. They don't know if the ATT 6126 will synch with a Mac. Of course they know the answer if synching with a PC (!!)

  • Recommendation Request: Best flatbed scanner for use with Mac and iPhoto?

    I have a flatbed scanner that Mac doesn't recognize. It's 9 years old, does a great job, but only works with Windows. Period. Don't ask what model or anything, I've already done the research, it's hopeless. MOVING ON... I'm tired of BootCamping to Windows, running scans, and then rebooting and hunting down the files...
    So, what flatbed scanner do you use, rank it on scale of 1-10, and how much did it cost?
    This thread might be useful to many people... FLATBED scanners, only, please. Make another thread for sheetfed scanners if you like.

    This site has some good info on many scanners: Scanner Reviews | Flatbed Scanner |.
    I'd look for one with high optical resolution. It's akin to the zoom in digital cameras, optical vs digital. FWIW I use a Canon 8600F (now replace by the 8800F) which does slides, film strips as well a photos. What I like about it is that you can scan multiple photos and have each saved to it's own file. Other brands of scanners offer that as well I'm sure but it'sjust a feature to consider. My scanner also came with a bundled copy of Photoshop Elements for Mac. Not the latest version but worked very well. Its replacement also bundles PSE.

  • Question about Formatting Buffalo USB 1TB external drive for use with Mac Book Pro Mountain Lion HD

    Hi there, Have Mountain Lion HD operating system (not sure if it is 10.8 or 10.8.1. or 10.8.2)  and have a Buffalo USB 3.0 1TB hard drive. When go to utilities to try and format with Mac OS extended, following 3 files show. DriveNavi. exe, Slm.exe and Mac. The option to left click and erase menu is not there. Or at least not as shown in all the help videos.
    It is USB connection so will take ages but want to use drive to store video footage and also partition to back up Time Machine. ( travelling in South America and no other Ext Drive option available too buy) how much space should i assign to Time Machine when partitioning?  Is there anything else i need to think about? as new to formatting. Any thing else i can do to make process of transfering footage to Buffalo quicker?
    Final question is if it is finally reformatted am i going to have to spend so long accessing footage from hard drive when back home and editing that it really is not worth if, and i should just write this off as an inappropriate purchase, and try and buy more memory cards and not bother with transfering/storing? Thanks in advance for time spent trying to assist.

    Use Apple's Disk Utility in the Applications/Utilities folder to format the drive.
    The programs on the drive given to you by the manufacturer is likely backup software (or malware) and essentially worthless, it will be wiped when you format the drive.
    I do NOT advise you partition that drive for TimeMachine, rather I advise you not to use TimeMachine at all for your purposes because TM is just a backup, not a bootable drive.
    Rather do this.
    Get another hard drive that is equal to or slightly larger than your boot drive.
    Format the drive in Disk Utiltiy > 1 Partition, option: GUID, Format: OS X Extended journaled, click Erase and move the slider one spot to the right and click Erase. This will take some time as it's going to map off any failing sectors it can BEFORE you lay data on the drive corrupting it.
    Next, pay for and download Carbon Copy Cloner, use the default settings and simply clone internal drive to the external drive. this will also take some time the first time.
    Next use Disk Utility to Repair Permisisons on both drive. Now reboot the machine and hold the option key down, you can select the external drive clone to boot from!!
    You can update the clone the same way by using CCC, but it doesn't take as long, only copying changes.
    This is better than TimeMachine as a bootable clone is bootable in case your internal drive fails to boot the machine.
    Use the first drive for storage and be very gentle with it while it running, like you should do for all hard drives as they are subjective to shock damage.
    The objective with the clone drive is you keep it safe, and not carting it around where it can be more subjective to damage like the other drive will be.
    Remmeber you need 2 forms of hardware backup at all times.
    Most commonly used backup methods

  • Best router for compatability with Mac & Airport?

    I need to buy a wireless router, and know little about them. This will be for home use, and will be used for 2 people with their own computers. Distance is not a factor, as it's just a regular house, although the router may have to be placed in the garage, where the modem is currently located.
    Does Linksys or NetGear generally work best with Mac hardware, or are they fairly even in that respect? I was told by a salesperson yesterday that the NetGear is easier to configure, but that the Linksys provides better security.
    I looked at a NetGear WGT624 v3 ($50), and a Linksys WRT54GS ($90). I figure its best to go with the cheaper one, since a new wi-fi standard is expected later this year, and I'll probaby upgrade. Do routers have software to log the history of addresses visited, or is there software available to do this or to prevent my history from being logged? I'm just thinking about keeping my web activity private from the other user, as well as being able to check if their activity is all legal, since they'll be sharing my ISP.
    iBook G4 1.33, Airport Express   Mac OS X (10.4.4)  

    OregonRebel
    There is no difference between the security settings on a Linksys or Netgear as far as I know.
    I have a DG834 with a WPN824 as a wireless access bridge for my elderly next door neighbor, it's so far proved it's use never had a problem with this setup.
    I would say it boils down to personal choice which one you go for, I have always used Netgear.
    I can log all IP's my neighbor visits, however I have known him for 24 years and can't really see him doing anything illegal !! Likewise where I go and visit he cant see

  • Best router for compatability with Mac & Airport Express?

    I need to buy a wireless router, and know little about them. This will be for home use, and will be used for 2 people with their own computers. Distance is not a factor, as it's just a regular house, although the router may have to be placed in the garage, where the modem is currently located.
    Does Linksys or NetGear generally work best with Mac hardware, or are they fairly even in that respect? I was told by a salesperson yesterday that the NetGear is easier to configure, but that the Linksys provides better security.
    I looked at a NetGear WGT624 v3 ($50), and a Linksys WRT54GS ($90). I figure its best to go with the cheaper one, since a new wi-fi standard is expected later this year, and I'll probaby upgrade. Do routers have software to log the history of addresses visited, or is there software available to do this or to prevent my history from being logged? I'm just thinking about keeping my web activity private from the other user, as well as being able to check if their activity is all legal, since they'll be sharing my ISP.
    iBook G4 1.33, Airport Express   Mac OS X (10.4.4)  

    No answers, so I'm cancelling the post.

  • Publish for Approval with .Mac

    If anyone has used the new "Publish for Approval" AppleScript and has found a way to publish these pages to a .Mac account/web page, would you tell me how you did it. I have been waiting for something like this forever but dont want to have to leave my computer on all the time to run as a server for these pages.
    What seems to be the issue is that it creates a web page from the Personal Web Sharing in Settings and uses your mac as a server, the only way people can get on is if your mac is active and allowing connections.
    http://automator.us/aperture/publish/?sr=hotnews

    I'm not the developer of this interesting looking package, but it doesn't look like it's something that will work with .Mac at all.
    The web pages is creates rely on an application to be running on the machine that's serving the web page (which, as it's designed, would be your local Mac). This application needs to receive approvals from the web page events, and also needs to be on your machine so that it can use AppleScript to set the metadata in your Aperture library so that the approved pictures show up in the smart group. Neither of these are possible if the site is served on .Mac.
    In theory, this could run on a remote machine, since AppleScript can target processes on remote machines. But to make it work, you'd still need the CGI application on the server, and you'd also need to open your Mac to allow remote AppleScript execution over the Internet (which gets into network setup, probably secure SSH tunnels, etc). Your Mac would also still need to be on, and allowing this connection, otherwise Aperture wouldn't be notified when someone approved pictures.
    To make a short story long, it won't work with .Mac.

  • Avoiding change pointers for data with status planned

    Hi,
    we have to distribute HCM-data, standard infotypes and customer infotypes, into other SAP sytems. One of the receiving systems must not get data with the status planned (istat = 2).
    Which would be the best way to avoid planned data in the receiving system? Is it possible to avoid creating change pointers for planned data in the delivering system or have I to delete the planned data in the receiving system while processing the idocs via user-exit?
    Best regards
    Stefan

    Dear Stefan,
    You can create the change pointers manually from the IDOC data (e.g.with  FM CHANGE_POINTERS_CREATE) during the inbound processing within of the customer-exits of enhancement RHALE001 or within an own BAdI implementation of BAdI HRALE00INBOUND_IDOC.
    Or else you can use method IDOC_DATA_FOR_RECEIVER_MODIFY of BAdI HRALE00OUTBOUND_IDOC. In this case please make sure that note 1292241 is implemented.
    Hope it helps,
    Christine

  • Sync numbers for ipad with mac

    Hey I just got an ipad 2 and the numbers app.  I need to keep my databases in sync..ie updates on ipad should sync with mac and visa versa, please give me some advice on how this can best be achieved?
    Chris

    The only way I have found so far is:
    Syncing from the Mac to iPad - you need to ADD the file to the iTunes file list, under File Sharing, for the appropriate App. This applies every time the file is changed on the Mac. If the file already exists on iTunes you will need to accept the overwrite option for the updated file. Next remove the file from the iPad and import the file again over WiFi from the Mac.
    Syncing from the iPad to the Mac - highlight the file to be in sync [ for Pages and Numbers the file in the centre of the screen under My Documents ] and select the Transfer icon. Then select the option Transfer to iTunes. In iTunes you then need to select the file and click on the Save To button and then select where the updated file is to be saved.
    The problem with transferring documents to the iPad etc. is that it needs to be attached to the Mac in order that the list of Apps and Documents that allow File Sharing can be seen. Strangely the only way to transfer files back and forth is via WiFi - not USB. Stupid really. Apple needs to sort this out as the current arrangement is rather amateurish.
    Dezzar

  • Webmail with .mac account synching other HTTP and IMAP accounts

    Sorry this may have been answered numerous times but i havent been able to find an answer. I am thinking for signing up for a .mac account. I prefer to keep all my email on server and not on my macbook. Can I somehow synch a hotmail account and another webmail account from charter.net so that they go through the web based macmail? (i want to just check one email account but have had both other accounts forever and dont want to delete them)
    thanks

    FYI- You are posting in the OS X Server section of the Apple forums...
    Look at your other accounts and see if you can forward mail from them to another address (your new .mac account).
    Then use just .mac mail
    Jeff

  • Reformat external HD and possibly partition for use with mac and pc.

    Hi. I’d really appreciate some advice.  I’m a new Mac (MacBook Pro mid 2012) user.  I’m trying to figure out how to use a new external HD (WD My Passport) that just arrived today in connection with a digital tv media player (NBOX V3) that I use to watch videos on my tv, which is in the NTFS format. The tv box works with a flash drive that I have, which I had to reformat as FAT32.  Since I tend to max out the storage on the flash drive I ordered this new hd to use as well. 
    When I went to reformat the new hd I didn’t see the FAT32 option. There are 4 Mac options, MS-DOS (FAT), and ExFAT to choose from.  I read that ExFAT would work with both mac and pc (since I’m using OS 10.8.4 and my pc is Windows 7).  I was excited about it too since I know that FAT32 has a 4gb limitation.  I reformatted as ExFat first on my Mac and then on my pc.  I tried both b/c I read conflicting comments about it not working when reformatting on the mac, but that it would work when done on the pc.  Both times I tested the newly formatted hd on the tv box and both times it failed to recognize the files. After the failures I wondered if it was even possible for the external hd to work with the tv box, or if it had something to do with the ExFat format.  So, I reformatted it on my pc to NTFS and then plugged it into the tv box, which works just fine.
    I could really use some advice.  I wish the hd had the FAT32 option.  I’m wondering about partitioning.  I really don’t know too much about it, but am wondering if this might be the answer to make everything work.  I would need everything to work from my mac b/c the pc belongs to my husband (which I’m welcome to use), but all of the files that I load are from my computer (not to mention I’m already “used to” my mac and now seem to fumble around using a pc).  This might sound dumb, but I was thinking that if I made 2 partitions (one that would work with my mac and one that would work with the tv box, maybe the FAT option?) then I could load files on the mac friendly partition and then transfer them to the tv box friendly partition.  I’m thinking it won’t work so I wanted to find out first, plus I’ve never partitioned anything before.  I also know that on another external hard drive that we have for the pc I’m not able to modify the files on it from my mac, although I can see them and extract them.  I’m thinking if I partition this new hd I’ll have the same problem with the partition that is formatted as FAT.
    Partitioning might not even be an option.  If anyone knows a way to make what I want to do work, then I would really appreciate the advice.  Thanks in advance.

    Digital tv media player (NBOX V3) - NTFS, FAT32/MSDOS
    Mac - HFS+, exFAT (formatted on a PC best), FAT32/MSDOS
    Windows PC - NTFS, exFAT, FAT32/MSDOS
    Problem is if you use FAT32/MSDOS your capped at 4GB sized files and can't use larger storage drives. The other formats have no problem.
    The Mac can't write NTFS without further software being installed like Paragon NTFS
    I usually try to stick with neutral formats, but if your NBOX V3 doesn't accept exFAT then your stuck.
    Perhaps you should see if there is a firmware update for it that will enable exFAT, then format the drive exFAT on the PC and you should be set.

  • I recently purchase macbook air with OS 10.10.2. I want to use my Seagate external backup plus hard drive for time machine back up. How to partition my 1TB Seagate back up plus hard drive for use with mac and windows pc?

    Hi All,
    I recently purchased 13" Macbook Air with OS 10.10.2. I want to use my 1TB Seagate backup plus external hard drive as time machine and my windows 7 pc. Please suggest a method. Thanks in advance for your reply.

    I strongly recommend having an external drive dedicated solely for TimeMachine. You could partition the drive but if something goes wrong you risk losing the data on both partitions. Should you decide to go ahead with splitting the drive for two different uses you’ll need to partition the drive either using the Mac’s built in Disk Utility program or Windows utility. I believe the built in Windows disk utility program will destroy the current partition and erase the data that’s on it - I use a third party Windows disk utility program for partitioning and it allows for non-destructive partitioning but warns to back up data first just in case. Apple’s Disk Utility can do non-destructive partitions but I don’t recall every trying to do a non-destructive partition on a disk originally formatted for Windows using it. Again - back up that data just in case.
    Finally, your TimeMachine drive should be at least 1.5 times (I prefer 2 times) the size of the data you expect to be backing up a year or two from now.  In other words, if you currently are using 50GB of your computer’s drive but expect to begin purchasing Mac software to replace software on your Windows computer and if you expect to be putting photos, music, and other data on it you might expect that two years from now you’ll have 100GB of stuff on the drive. So a 200GB partition is the smallest size you’d want.  TM’s backup scheme keeps multiple copies of data as it changes so the extra room is important for this scheme.

  • Format external HD for use with Mac Network and PC

    System config: Home network: Mac Pro & MacBook Pro connected via AirPort Extreme. Both run OS X 10.5.6. The Mac Pro also runs Windows XP Pro. Work computer: Dell, Latitude D830 running Windows XP Pro.
    Situation: I have a Western Digital WDMT5000TN 500GB Portable HD, (FireWire 800 & USB). The WDMT5000TN came formatted Mac OS Extended, which, as I suspected, could neither be read nor written to in XP. I reformatted the drive NTFS in XP Pro. This worked well with XP but was read only in OS X.
    Ideally, I would like to format the drive so that it is both read/write capable with both OS X & XP Pro and handle file transfers in excess of 100 MB. If this is not possible my second choice would be to have the drive read/write OS X & read only XP, given that I upload mostly in the Apple domain & would be able to perform backups of it’s contents using Time Machine with OS X.
    If anyone has a formatting recommendation or related information that may help I would appreciate your insight. Thank you.

    Two basic options:
    1. Format the drive FAT32 (MS-DOS) which is read/write on both Windows and OS X.
    2. Leave the drive formatted NTFS and install software on OS X to enable read/write access. The options are: a.) Paragon NTFS for Mac OS X - 6.5.1; b.) MacFuse and NTFS-3G 2009.2.1u1; and, c.) NTFS for Mac 1.0.

Maybe you are looking for

  • Video out from the headphone jack died... 30gb 5g

    Hi all. So, I have a 30gb 5g ipod. I have played video out of the headphone jack to a tv for years now. I have the apple version of the video out cable. So, recently, the video stopped playing. The audio plays. YES, it is set to tv out = on, NTSC. Th

  • EPMA Essbase vs. Classic Essbase | Best practice question

    Dear all, With no formal training on the topic of EPMA but with the experience of using it together with Planning, I'm aware that deployment in EPMA is destructive for any content created manually in the Essbase application under it. e.g. when doing

  • Mavericks cannot  search mail

    Hi i hope u guys can help, I cannot search anything in mail, from, or sent. SMART mailbox also stopped working. Any thoughts?? yes i also already rebuild but no luck..

  • N95 8Gb Adobe Problems

    Hi Has anyone else having problems with Adobe (le 1.5) on N95 I had an email with a 6kb pdf file but the N95 doesn't reconise the file so I cant open it. Thanks Graham

  • Hi can u please help me out to display multiple [b]thumbnail images[/b]

    hi, hi, please help me out! please help me out!! I need to display multiple thumbnail images on the jframe or on a jpanel . From the database where the path of the images are stored say i should first get thumbnail of the images and then display any