Afplay and controls

I play audio files with QuickTime Player and it works perfectly, with the help of some friends.
But I am curious and want to find out whether afplay would be a suitable alternative.
After some research on various forums and internet in general I concluded, that afplay is rather primitive.
One can play afplay and one can kill it; that's all.
I didn't find a way to pause or resume it.
I know, that afinfo supplies info about the duration, but that information is already available in my own program.
I can't find the current time of the playing audio file in analogy with QTP, so I can't determine, when to stop or when the song is completed.
Should I give up on afplay or could you suggest any alternatives?

I followed your suggestion and installed "Play Sound" as an alternative to "QuickTime Player" and "afplay" which both work fine, although "afplay" does not allow as much control as I want with regard to pause and resume.
"Play Sound" also works fine, but I can't get the info for duration and position(=current time) which I need to end the loop in time. Probably I ask for the info at the wrong level.
The following script is an adaptation of a script written for QTP by my good friend Hiroto and a bit by myself; everything works except for the duration and position variables which however are crucial to obtain the required control. Could you have a look at those lines?
=========================================
set the_path to cell "bestandspad3" of current record --record in Filemaker Pro
tell application "Play Sound"
play the_path
end tell
set tekst to ""
repeat
display dialog "Interrupt" buttons {"Stop/Pauze", "Next song", "Next artist"} giving up after (my secLeft())
set {b, fin} to {button returned, gave up} of result
display dialog "resterende tijd: " & secLeft() buttons {"ok"}
if fin then exit repeat
if b = "Stop/Pauze" then
tell application "Play Sound" to pause
display dialog "Stoppen of verder gaan?" buttons {"Echt stoppen?", "Hervat"} default button 2
set b to button returned of result
if b = "Hervat" then
tell application "Play Sound"
tell sound -- document 1 in QTP
get duration of sound
get position of sound
if duration of sound = position of sound then exit repeat
-- duration and possibly position are not recognized
end tell
resume
end tell
else
set tekst to "Stop"
exit repeat
end if
else if b= "Next song" then
set tekst to ""
exit repeat
else
set tekst to "Next"
exit repeat
end if
end repeat
set the clipboard to tekst
tell application "Play Sound"
stop
end tell
on secLeft()
tell application "Play Sound"
tell sound -- document 1 in QTP
-- set d to (duration - position)
-- duration and position are not recognized; next line is temporary.
set d to 15
end tell
end tell
set d to round d rounding up
if d<1 then set d to 1
return d
end secLeft
========================================

Similar Messages

  • I have 3dparty software wirelessly with a cryptographic authentication system without my consent (seems to be new technology developed by stanford) obtaining ownership of my iPhone 4s software and controlling it with remote device to jail break. Now what?

    I have 3rd party software wirelessly injected and used on my iphone with a cryptographic authentication system without my consent (seems to be new technology developed by stanford and apple security is not updated for this technology) obtaining ownership of my iPhone 4s software and controlling it with remote device to jail breaking my phone, adding and removing software, changing settings all from a remotely controled device from different location (I have a Mac address I'd of this device to know for sure). Almost undetectable. When I look at the legal section of my phone it shows a list of all the unauthorized 3rd party software "as is" copyright encrypted on the phone.  This is the most basic way to legally steal software of any kind.  Because of this legalality 3rd party ownership have total control of certain software correlated with hardware use including visualization technology, etc.  most people luckily will never have this happen to them so it's unlikely many readers have not a clue of what I'm saying currently.  Either way, without needing to obtain specific warranty of any kind "as is" copyright control makes system restores not a solution because the source code is not directly encrypted on the actual hardware device only a copy right notice must appear on the specific device 3rd party software validation making it extremely difficult for me to take control of the situation. Apple claims their iOS technology prevents this type copyright obstruction from being possible, however, according to my phone a new form of technology was used developed by Tom wu of Stanford university called the STANFORD SRP AUTHENTICATION TECHNOLOGY which uses Some form of cryptographic authentication system and uses quote "secure remote password" which seems to suceed in hacking iOS apple technology apple claims is not possible to jailbreak an unstolen phone or without the owners consent As well as loading the device with 3rd party copyright Notices to make all of this legalized. My phone shows atleast 30 pages worth of legalized 3rd party copyright permissions! Yesterday my apple care provider labeled me a jailbreaker and refused to look at my legal documented proof which completely blew my mind because it voides my apple care contract I spent 100 on. This employee did not take all factors into consideration and made quick assumptions as well as verbally speaking to me as I'm an automatic criminal. I left the store yesterday with no payed insurance help on a problem I had no control over and couldn't prevent, leaving with voided contracts. This is an apple users worst nightmare and I have spent days researching all of this like i am some kind of lawyer only to be able to use my phone the way it should and spent alot of money on.  I can legally backup any claim I have just wrote above currently and have a large source of data collected to prove apple is wrong in voiding insurance support on this issue. The problem lies in apple avoiding and not wanting to believe their software can legally be obtained ot "hacked". Yet still labeled a jailbreaker basically.. What should I do????? Been to local apple store 3 times and rebooted my phone as well sprint service restore 4 times and spoke with reps twiice on the phone. Spoke with my phone provider who said apple has full control over these matters so they can't help me.  My case is according to apple "still open"...Anyone else heard of this or of Stanford's office of technology licensing? Maybe I need to buy a blackberry again or just use a landline so I can stop being my own lawyer and focus on other productive areas in life instead of this horrible mess. I shouldn't have to prove to apple I not a jailbreaker they should have to prove I'm one before voiding support I desperately need!!

    Mullaly75 wrote:
    I assume u guys don't understand what open source software is
    Yes, I think most of us do understand what open source software is. It sounds as if you don't. Here's some information:
    Open-source software (OSS) is computer software that is available in source code form: the source code and certain other rights normally reserved forcopyright holders are provided under an open-source license that permits users to study, change, improve and at times also to distribute the software.
    Open source software is very often developed in a public, collaborative manner. Open-source software is the most prominent example of open-sourcedevelopment and often compared to (technically defined) user-generated content or (legally defined) open content movements.
    from http://en.wikipedia.org/wiki/Open_source_software
    Yes, Tom Wu of Stanford wrote a paper on something called Secure Remote Access Protocol. It's a form of Asymetric Key Exchange and has nothing to do with hacking anything. It's actually intended to protect data.

  • Control parallel port (data and control lines)

    I need to control the output on the parallel port (LPT1) - Both data and control lines.  Once the data is written (Pins2-9), I then need to toggle the Sprocket signal (PIN1) - on the parallel port. The sprocket signal is also referred to as the Data Strobe Output.
    The required method is as follows:
    1. Lower the sprocket signal on PIN1
    2. Send the data (Pins2-9) and wait
    3. Raise the sprocket signal and wait.
    4. Repeat.
    I am looking for a method to control the data on LPT1 pins 2-9 and then be able to toggle PIN1 - Strobe signal - without the data falling from the other pins. What I have found is that whenever the state is changed on the strobe - the data that was written to Pin2-9 falls to zero. This will not work for my application - the strobe tells the hardware device that the data is ready. If it falls to zero when I toggle the strobe - that will not work.
    Regards,
    Guy

    Hello Adam,
    I am familiar with both references.  If you look more closely at the library reference - it allows me to communicate using VISA across the parallel port pins 2-9.  It does not permit direct communication to pin1 (the strobe signal) - property nodes don't allow the strobe to be refereced either (similar to control lines/signals for COM ports).
    Worse, I have also located examples using OUT PORT that does enable pin1 to be toggled.  The problem is, when those VIs are used, the data falls from the data pins when the strobe signal is written, even if its value is not changed.  For example, if the strobe is already high, if another high value is passed, the data falls from the data lines.  The other issue, when using VISA, as soon as the data is writen, the strobe signal automatically goes high even though I need a wait before setting the strobe high.  This is in complete contradiction to the second article you referenced which clearly discusses writing data to pins2-9 then taking the strobe high to indicate to the printer that new data is available.  It must be possible since this is the typical handshake.
    I am still looking for a more complete answer/solution.
    Regards,
    Guy

  • Aging report and Control account value not matching

    Hi All
    The value what i am getting from   Vendor liabilities aging and Control account is not matching  for the same dates, all my parameters or selection criteria are same
    Same report if i am taking for the current date it giving correctly,
    If i am trying for a previous day the problem is happening
    How can i solve this issue

    Hi,
    Please check if the transactions are done for different Control Accounts and both the account balances are included in the Aging Report.
    Also, check that ALL the customers/vendor groups are taken.
    Make sure that you are running the backdated aging with the checkbox as mentioned in the Note 800294.
    If still facing problems may be you can provide with more details as to what the control account balances and what is the Aging, difference.
    PS: Check if there is any manual journal entry is created in the control account?
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • Can i connect my iMac to a mac mini (wirelessly) and control the mac mini display on my TV?

    Can i connect my iMac to a mac mini (wirelessly) and control the mac mini display on my TV?

    Look up "screen sharing" in help
    You can control your mini (which I am assuming you are hooking to your TV) complete from your iMac.
    After you set up screen sharing, you can go to the finder, under the "go" menu choose "Connect to server" and then browse.  Choose your mac mini's name, and look for the "Screen Sharing" button.
    Choose Apple menu > System Preferences, and then click Sharing.
    Select the Screen Sharing checkbox.
    To specify who can share your screen, select one of the following:
    All users:
    Select this if you want to allow any user with a user account on your computer to share your screen.
    Only these users:
    Select this if you want to restrict screen sharing to specific users.Click Add at the bottom of the Users list and select a user from Users & Groups (accounts you have set up in Users & Groups preferences), Network Users (users on your network), or your Address Book. Or click New Person and enter a name and password to create a sharing account. Then select that user from the list, and then click Select.
    Click Computer Settings and set the following options:
    Anyone may request permission to control screen:
    Select this to allow anyone on your network to request to share your screen.
    VNC viewers may control screen with password:
    Select this and enter a password that VNC viewer applications can enter in order to control your screen.It’s recommended that you not set a password if you only share this computer’s screen using the built-in screen sharing viewer in Mac OS X.

  • MacBook Pro 2.3 os 10.6.8 control-C and Control-v don't work

    On MacBook Pro 2.3 OS 10.6.8, control-c and control-v don't work in any app Please help

    If you mean copy and paste, that's Command c and Command v, not control key.

  • How to create parameter and control file like filename + date

    Hello there
    I am trying to create parameter and control file with following command
    in SQLPLUS
    create pfile='/u03/oradata/WEBDB/backup/initWEBDB.ora' from spfile;
    In RMAN
    copy current controlfile to '/u03/oradata/WEBDB/backup/cf_longterm.cpy';
    how can I put date at the end of filename like
    initWEBDB8jan06.ora and cf_longterm8jan06.cpy
    Thanks in advance
    Lionel

    ASM is reliable but a smart DBA is very careful. If ASM is doing mirroring this is like RAID doing mirroring. What happens if you accidentally delete one copy ... the other one disappears instantly. Not a good idea.
    With respect to redo logs you need a minimum of three groups, two members, and one thread per instance. So a 2 node cluster should, at a minimum have 12 physical files.
    Not mirroring the redo logs, assuming multiple members, is not as critical.

  • How to create redlog and control file at ASM in linux RAC

    Hi Experts,
    I will to maintance a oracle 10g database at ASM as RAC iin linux red hat.
    i am a new person with some question.
    nornally speaking, oracle recommadition for oracle 10g database as
    create 3 copy fills for control file
    create at least 2 redo log with mirror files in system.
    However, I checked find
    redlog file is at FRA place +FLSdisk1 and no mirror
    control file is at FRA place--+FLSDISK1/
    datebase file at ‘+DATA1/
    There are no mirror for relog.
    Go to EM, I also could not find place to enter file name.
    We use ASM to hold database to support RAC.
    Do i need to create redlog file as
    ALTER DATABASE ADD LOGFILE GROUP 1 ('+FLSdisk1/sale/onlinelog/REDO01.LOG','+FLSdisk1/sale/onlinelog/REDO01_mirror.LOG') SIZE 1000M reuse;
    my boss told me that ASM is reliable.
    Do you need to creat more directory to arrange redlog and control files in ASM for RAC system?
    FRA is a good place to store control file and redlog file ?
    Thanks
    JIM
    Edited by: user589812 on Jul 3, 2009 3:03 PM

    ASM is reliable but a smart DBA is very careful. If ASM is doing mirroring this is like RAID doing mirroring. What happens if you accidentally delete one copy ... the other one disappears instantly. Not a good idea.
    With respect to redo logs you need a minimum of three groups, two members, and one thread per instance. So a 2 node cluster should, at a minimum have 12 physical files.
    Not mirroring the redo logs, assuming multiple members, is not as critical.

  • After updating to iOS 8 notification and control center won't open when unlocked

    Ever since I updated my iPhone 5s to iOS 8, the notification and control center will not open while my phone is unlocked. I checked to see if I had it disabled in settings and it turns out I did not. I switched the Access Within Apps as well as the Access While Locked on and off anyway but still nothing. I can only pull the notification and control center open while my phone is locked... it is extremely annoying. I know I'm not the only one though because my friend who updated to iOS 8 on his 5c was having the exact same problems. Some help would be much appreciated. Thank you!

    So yesterday vibration suddenly started working again, after nearly two weeks with the problem above. I have no idea why, I didn't change any settings and the only app that was updated yesterday was Facebook messenger...

  • BEA / Wily:  Financial Webinar - Achieving Availability, Performance and Control of Java Applications in Financial Services

    Event Date: October 1, 2002 at 11:00 AM Pacific (US), 02:00 PM Eastern (US)
    To register: http://regsvc.placeware.com/?wily-bea1001
    Title: Achieving Availability, Performance and Control of Java Applications
    in Financial Services
    Abstract:
    In today's competitive environment, financial institutions must focus on
    three key business goals:
    a.. Creating a customer-centric enterprise to maximize value to customers
    and increase share of wallet
    b.. Improving transactional efficiency for rapid delivery of the right
    products, services and information to customers and to employees
    c.. Accelerating the decision making process to mitigate risk and improve
    returns.
    BEA and Wily Technology have helped a number of financial services firms
    meet these objectives by delivering high-performance business solutions that
    meet rigorous demands for performance, reliability and scalability.
    On October 1, 2002, Wily Technology and BEA will present a joint Web seminar
    titled "Achieving Availability, Performance and Control of Java Applications
    in Financial Services" with Eric Gudgion, Principal System Architect,
    Technical Solutions Group at BEA and Chris Farrell, Director of Technical
    Marketing at Wily. This Webinar will showcase the many advantages that the
    WebLogic® Enterprise PlatformT and Wily's Introscope® offer financial
    services firms.
    Attendees will learn how WebLogic Server, BEA's unified, simplified and
    extensible solution, provides a robust platform for the development and
    deployment of enterprise Java applications. Some examples of what financial
    institutions can achieve with BEA include Multi-channel Services Delivery,
    Straight-Through Processing, Wealth Management and Cash Management.
    Wily Technology will highlight Introscope's ability to manage financial
    services Java applications by pinpointing component-level performance issues
    in real-time, whether in the application, application server or
    Java-connected back-end systems. Wily's suite of Java application management
    solutions offers a comprehensive platform for achieving 24x7 application
    availability, enhanced performance and better control of IT resources.

    First of all you should check out which products are supported on 64bit :- http://www.oracle.com/technology/products/bi/hyperion-supported-platforms.html
    If you are planning on using windows 64bit EAS then you will have to manually deploy the web application, it cannot be automatically deployed.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to access custom property for attribute and control in .vm file?

    Hi,
    I have created custom properties in OPM for attribute and apply also that properties to attribute.
    But if how to access that value in .vm file?
    I accessed using
    $attribute.getProperty("ScreenProp", "default value")
    but it's not working but same is worked for screen custom property

    $control.getProperties().get("PropertyName") works for custom properties on a control
    If you output $control and $control.getProperties() to the html you can lookup the API for the used classes.
    I can't give an example of the html because it's stripped in this forum
    Edited by: Peter van de Riet on 20-mei-2011 14:18

  • How to remap keyboard - Looking to switch the "fn" and "control" buttons?

    Hi I was looking for a way to switch the function and control on the bottom left side of the keyboard on my macbook pro laptop. I am used to the control button being the button that is furthest to the left and its just really throwing me off having the fn key all the way to the left. If anyone knows how to remap these keys, I would really appreciate the help.
    Thank you.

    Firefox 4.0 has a combined Reload and Stop and Go button that appears at the right end of the location bar.
    To restore the Firefox 3 appearance you can use these steps:
    * Open the "View > Toolbars > Customize" window to move the Stop and Reload button out of the location bar.
    * Move the Reload and Stop buttons to their previous position at the left side of the location bar.
    * Set the order to "Reload - Stop" to get a combined "Reload/Stop" button.
    * Set the order to "Stop - Reload" or separate them otherwise to get two distinct buttons.

  • Location of Redo log and control files?

    Dear all,
    I am checking the location of redo log and control files, but found that the redo log file (like log02a.dbf ....) in the same directory of data files. However, I couldn't find any control files in the data files directries.
    What could be the location of control files?
    Amy

    select name
      from v$controlfile
    or
    show parameter control_filesKhurram

  • Could I connect the lap top to TV and watch movies and control the lap top from a distance?

    could I connect the Apple lap top to my TV to watch movies and control the lap top from a distance just like the Window lap top???

    Check out Apple TV.  It is a wireless interface to your TV.  It may be the best $99 investment you can make for entertainment on your TV.  It simply requires a standard $10 HDMI cable, not supplied with the Apple TV unit.  Through Apple TV, with Mavericks, you can use the TV as a standard OS X monitor or for entertainment.  Also check out the Beamer software to stream videos to it from your Mac.
    Apple TV requires a Mid 2011 or newer MacBook Air with OS X Lion v10.7.5 or later.
    If your MBA is not new enough you can use the AirParrot application but the video quality is not as high as with a newer MBA.  It also streams from iOS devices.
    http://www.apple.com/appletv/
    http://www.apple.com/appletv/airplay/
    http://store.apple.com/us/ipod/ipod-accessories/apple-tv
    http://www.apple.com/osx/whats-new/features.html#displays
    http://www.amazon.com/AmazonBasics-High-Speed-HDMI-Cable-Meters/dp/B003L1ZYYM/re f=sr_1_1?ie=UTF8&qid=1385514116&sr=8-1&keywords=hdmi+cable
    AirPlay is available on all devices running iOS 4.3 or later. Some features require the latest software. Second-generation Apple TV or later required.
    AirPlay Mirroring is available with iPhone 4s or later; iPad 2 or later; iPad mini; iPod touch (5th generation); and iMac (Mid 2011 or newer), Mac mini (Mid 2011 or newer), MacBook Air (Mid 2011 or newer), MacBook Pro (Early 2011 or newer), and Mac Pro (Late 2013) with OS X Mountain Lion or later.

  • Start up pause/hang before loading A-Dock and Control Strip

    Ok, I know, running a sooped up 7200 PowerMac is not worth the time or money, but...I've got this hang that's become more pronounced lately.
    Everything seems to load fine. After about 3-5 minutes A-Dock and Control Strip come one. Already tried disabling both, no luck. That's why I think the mouse is the problem. Logitech Wheel mouse works but not to full functionality (gonna try USB Overdrive); Mouseware 4.0.6 now installed but seems flaky (RH and wheel button work intermittantly, usually after replugging in the USB), and can't seem to locate the install CD which had an earlier version. May also try the serial mouse again too.
    Mouse also hangs in some browsers and seems to cause crashes.
    I've got a SCSI external drive (IDE 6) and terminated.
    I'll do more testing, but would appreciate any obvious fixes
    Thanks in advance

    Do you have the problem if you start up with Extensions Off?
    A problem on the SCSI bus can cause your problem. Disconnect all external devices except kbd, mouse & monitor and see if you have the same problem.
    Not sure it will help, but won't hurt to zap PRAM also.
    Cheers, Tom

Maybe you are looking for