Occasional audio 'pop' using analog output

When watching a movie and hooked up to my fairly large speakers, the audio will give an occasional "pop". Now, this doesn't happen too often, but in the course of a long movie, it may happen two or three times. I don't seem to encounter this problem with headphones on. Now, is this a problem of the computer, or the speakers themselves?

Is there a Terminal command ("defaults write" ...) that disables the automatic shutdown of the sound circuit after a period of audio inactivity?
As a workaround, I made this AppleScript applet to play a silent sound file every 20 seconds, but sometimes the applet suddenly starts hogging the CPU and I have to quit it. It's an AppleScript thing, not this particular code, because I have a couple of other idle handlers that also suddenly start hogging the CPU, but I digress.
I would rather put a stop to the auto-audio-cutoff in the first place. (It's supposed to save battery power, but there's no reason for it when plugged-in to AC. It wouldn't really matter except for the "pop" from the speakers.)
on idle
    do shell script "afplay '/Users/[user]/Library/Sounds/Silentium.aif'"
    return 20 -- (Execute this idle handler once every twenty seconds.)
end idle

Similar Messages

  • Using analog output in the background

    Hi,
    I need to use the analog output channel on a NI PCIe-6351 to play an audio signal, and while the signal plays i need make some changes the UI dialog box, is it possible for me to move the playing of the audio to the background and proceed with program execution?
    Here is a simple piece of code that explains what I'm trying to do: 
    #include<stdio.h>
    #include<stdlib.h>
    #include<conio.h>
    #include<math.h>
    #include<string.h>
    #include<memory.h>
    #include<wchar.h>
    #include "sndfile.h" //include file for the sound library
    #include "NIDAQmx.h"
    #define DAQmxErrChk(functionCall) { if( DAQmxFailed(error=(functionCall)) ) { goto Error; } }
    float *fWavSample;
    SNDFILE *SoundFile;
    SF_INFO SoundFileInfo;
    int iNoOfSamples=0;
    int32 error=0;
    TaskHandle AOtaskHandle = 0;
    float64* AIOSample;
    char errBuff[2048]={'\0'};
    int32 fnCreateTask(TaskHandle *AOTaskHandle)
    int32 error=0;
    DAQmxErrChk(DAQmxCreateTask("", AOTaskHandle));
    Error:
    return error;
    int ReadWavFile()
    //Open the wav file for reading
    SoundFile=sf_open("sin_10s.wav",SFM_READ,&SoundFileInfo);
    //Check if file is opened sucessfully
    if (SoundFile == NULL)
    puts("File not opened");
    return FALSE;
    //allocate memory for the buffer that is to hold the wav data&colon;
    fWavSample = new float[SoundFileInfo.channels * SoundFileInfo.frames];
    iNoOfSamples = SoundFileInfo.channels * SoundFileInfo.frames;
    //Read data into the float structure that has been copied in
    sf_readf_float(SoundFile, fWavSample, SoundFileInfo.frames);
    //Allocate memory for the structure that is to hold the sound samples
    AIOSample = new float64[iNoOfSamples+660];
    //Copy wavefile data into the new float64 array (needs to be typecasted to float64)
    int i=0;
    for(i=0;i<(SoundFileInfo.channels * SoundFileInfo.frames);i++)
    AIOSample[i] = (float64)fWavSample[i];
    //After the float64 array has been filled, release the memory used by fWavSample
    free(fWavSample);
    return 0;
    int main(int argc, char** argv)
    DAQmxErrChk(fnCreateTask(&AOtaskHandle));
    //Create an analog out channel
    DAQmxErrChk (DAQmxCreateAOVoltageChan(*(&AOtaskHandle),"Dev1/ao1","",-10.0000000,+10.00000,DAQmx_Val_Volts,NULL));
    //16 bit output resolution needed, sampling rate matched to the WAV file's
    DAQmxErrChk (DAQmxCfgSampClkTiming(AOtaskHandle,"",44100.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1000));
    //Set the output to trigger on a rising edge on PFI6
    //DAQmxErrChk (DAQmxCfgDigEdgeStartTrig (AOtaskHandle,"PFI6",DAQmx_Val_Rising));
    //Start the task in the background
    DAQmxStartTask(AOtaskHandle);
    ReadWavFile();
    DAQmxErrChk(DAQmxWriteAnalogF64(AOtaskHandle,(SoundFileInfo.channels * SoundFileInfo.frames),true,10.0, DAQmx_Val_GroupByChannel,AIOSample,NULL,NULL));
    printf("Playing audio\n");
    Error:
    if( DAQmxFailed(error) )
    DAQmxGetExtendedErrorInfo(errBuff,2048);
    //puts(errBuff);
    puts(errBuff);
    return TRUE;//DefWindowProc(hwndmon,message,wParam,lParam);
    getch();
    The program reads a 10 seconds long 1kHz sine wave signal from a WAV file and plays it over AO0.
    I want the program to  print "Playing Audio" on the console window while the audio is still playing, i.e when DAQmxWriteAnalogF64 is executing.
    I'm using Visual Studio 2005 on Windows XP and an NI PCIe6351.
    I'd really appreciate any help I can get.
    Thanks a lot!
    RaziM

    Hi RaziM, 
    It sounds like you will need to implement some sort of multithreading to accomplish playing audio in the background and also making changes in the UI dialog box in the foreground. Since DAQmx is thread safe this should definitely be possible, but it will probably take a little more work on your part.
    You may want to take a look at this page which gives a walkthrough to Multithreading with a Background component, http://msdn.microsoft.com/en-us/library/ywkkz4s1.aspx
    Here is another forum post about how DAQmx runs multiple threads, http://forums.ni.com/t5/Measurement-Studio-for-VC/DAQmx-how-does-it-multithread/td-p/221953
    I hope some of this helps!
    Rachel M.
    Applications Engineer
    National Instruments

  • Using analog outputs in labview with

    I have recently started using the USB personal measurement device PMD1208-LS from measurement computing with labview. I am having problems with using the analog outputs in labview i keep getting error message 41 "This function can not be used with this board" The outputs are working fine when tested with the supplied software but not when using the Aout vi in labview. has anybody else had problems with this and know how to resolve them? I have the analog inputs all working fine in labview.
    Thanks

    I have used the PMD12208FS and I used this vi to use the analog outputs for it.  I obtained it from Measurment Computing ftp site.  The data value is in mV.  Hope this helps.
    Attachments:
    PMD1208FS_AOut_lv61.vi ‏17 KB

  • How can i deliver a single pulse of varying amplitude using Analog output and USB-6251?

    I am trying to generate an analog output for the following waveform:
    Pulse width: 300 usec, Frequency 40 Hz, Amplitude is following a sine wave with a 2 second period.
    My approach is: Use an async timer with 1/[40 Hz] sec  interval. I set the DAQ output rate at 1 MHz and the approach has been to generate and write 300 samples of the amplitude I need to send out, then wait for the next async interval callback , update amplitude etc etc.  The assumption is that once the 300 samples are written and the task started , a 300 usec pulse would be sent out , task then stopped and then the analog output would be set to 0 waiting for he next pulse.  The reality is that I get a stream of pulses of 300 usec which last the whole timer interval. 
    So , trying to establish whether what I am trying to do is feasible without actually sending a large array to the USB-6251 which would write zeros for the period after 300 usec.
    Here is my timercallback code for review:
        switch (event)
            case EVENT_TIMER_TICK:
                DAQmxErrChk(DAQmxStopTask(TaskAnalog));
    Determine Voltage value algorithm here
                //Generate Waveform and start Task
                //Prepare AO arr
                for (k=0;k<300;k++)
                    AOArr[k] = 0;
                    if (k<G_PulseWidth)
                    AOArr[k] =  VOLTAGE_OUTPUT;
                if (AOArr!=NULL)
                    DAQmxErrChk(DAQmxWriteAnalogF64 (TaskAnalog, (int32) 300 , 0, DAQmx_Val_WaitInfinitely, DAQmx_Val_GroupByChannel , AOArr, &sampsPerChanWritten, NULL));
                DAQmxErrChk(DAQmxStartTask(TaskAnalog));
                break;
    Thanks

    I did resovle the issue I encountered. It was due to bad configuration of the Task.
    My initial configuration was:
    DAQmxErrChk(DAQmxCfgSampClkTiming(TaskAnalog, "",1.0E+06, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps , 300 * 1.0E+06));
    which should be:
    DAQmxErrChk(DAQmxCfgSampClkTiming(TaskAnalog, "",1.0E+06, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps , 300));      
    THis did it. works very well.
    THanks

  • Buzz In Audio When Using DVI Output

    I've had this problem for a while now, but everytime I plug in a monitor to the DVI port I get a horrible buzz out of my audio interface. I've tried everything: using different DVI cables and audio cables, using different audio interfaces, disconnecting everything except the necessary things, etc. and no matter what, the buzz comes when I plug something into the DVI port. I'm assuming that this has to do with the video card, I'm just wondering if anyone else has had problems like this.

    Are the TV and the Mac plugged into different wall outlets in the room? It could be they are on widely different circuits, considering the wiring behind the wall, and that stray currents are flowing through the signal cables and upsetting the signals carried on those cables.
    If the above is true, try plugging the TV into the same outlet as the Mac and see if things improve.

  • Is any extra isolation required when using Analog output to dirve higer power circuitry?

    I want to connect the analog output of a DAQcard-1200 to a current amplifier to give 5A and a tranformer to give approx 200V, is any extra isolation required to protect the card?

    Hello;
    As long as the maximum current that the board can source is taken in consideration and the input impedance of the external circuitry is high enough to prevent signal reflections back to the DAQ board, you should be good to go.
    However, since the protection circuitry can be built with such little budget, I wouldn't take my chances. I would go ahead and include the protection circuitry anyway.
    Regards
    Filipe A.
    Applications Engineer
    National Instruments

  • Audio pops in tape output (HDV)

    I'm sending a native HDV timeline back to tape, but when I do so I get little pops in the audio. There are no audio artifacts in the timeline, and my file outputs (DVD mpeg and cineform AVI) both sound just fine. Any ideas what might be behind this? I'm running PPro CS3 v. 3.2.0 on the following system:
    Dell Precision PWS390
    Intel Core2 6400
    2.13GHz, 2GB RAM
    NVIDIA Quadro FX 3450/4000
    Thanks.

    Do you have Audition or some other wave editor that can change the soundfile to 16/44.1? If not, you might want to try Audacity. It's a free editor that works pretty good.
    audacity.sourceforge.net
    Just export the sound only from the timeline as a wave file, open with Audacity, change the bit depth and re-save it, then bring it back to the timeline in CS3 either on it's own track while muting the old one, or just delete the old one altogether after separating it from the video.
    At least I'm guessing that's the problem. If it is then you'll have clued us all onto to something new to watch for while exporting to tape. Consider yourself a guinea pig sir!

  • How to freeze analog output ?

    Hi,
    In my LabVIEW program, I need to freeze analog outputs (keep the last value) when appears for example an emergency stop.
    In this program, sometimes  I use  "simples" values to write outputs and other times I use waveforms.
    Is there an easy way to freeze outputs in both cases ?  (a better solution than modifying all the VIs using analog outputs  )
    Thaks for your help !

    Hi cpit,
    when you need an emergancy behaviour in your output VIs you have to program it...
    An easy way would be: IF emergency condition is met THEN don't output values.
    So a simple case structure will do the trick...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Which audio interface(s) for 16 to 20 analog outputs?

    Hi. I wonder if anyone can help me...
    I'm running Logic 7.2 on a black MacBook. For my inputs I am using the MOTU 8pre, as this is convenient especially when recording drums with my band... no scrambling together of pre-amps... no faff...
    The thing is... I've been given a shed load of gear (literally), including a 24 channel analog mixing desk and tons of outboard rackmounted effects units/compressors/gates...
    I would REALLY love to integrate the two systems, especially at the mixing stage, by routing my Logic tracks to the desk. Unfortunately, the MOTU 8pre only has a couple of analog outputs (+ headphone out).
    To make this a venture worth undergoing, I'm going to need a minimum of 16 analog outputs. 20 would be great if possible.
    I suppose my initial questions are:
    1. Can I daisy-chain 2 firewire audio interfaces (each with 8 analog outputs) to give me a total of 16 analog outputs?
    2. Bearing in mind I have a low budget, could anyone advise me on which units to get. I don't think I could afford any more MOTU gear, unless I find an amazingly low priced second hand item. What about Edirol or M-Audio?
    Thanks in advance.
    MS

    This is worth checking: http://www.ioneconnects.com/product.shtml
    Based on new DICE II firewire chip with JetPLL technology (should have much lower jitter than regular firewire Audio devices that are not built on DICE II).
    I believe that you can choose the configuration you need.
    The only question for me is whether they are affected by apple's firewire streaming bug. But as I've heard that in the info of 10.4.9 SDK is a statement, that core audio bugs were repaired, I hope the offset streaming problem will be finally the past...
    Man I am really considering this firewire snake, as it definitelly has many ins and outs - including 4 AES/SPDIF in and out!!!
    I am going to upgrade my studio and two of those will probably give me enough ins and outs for all my needs (musicians + outboard hardware and a summing mixer). I was also thinking about Symphony (PCI solution seems to be still more stable than firewire) and some I/O "modules" from apogee, but that is much more expensive. And I 've read only positive info about the DICE II, so maybe I will give a firewire another chance...

  • Audio sync problem - simultaneous HDMI and analog output

    I'm currently running my audio out through my Geforce 460 via HDMI to my A/V receiver. I have a simultaneous stereo analog output running through my ASUS Xonar D2, using Pulseaudio & Amarok as the player (VLC-gstreamer backend).
    I use the HDMI and A/V receiver to power my main stereo in my living room, but on occasion when I want music around the house, I use the analog line out to send audio to an FM transmitter.
    The problem is, I'm running into audio sync problems. The audio starts out synchronised (at least to the naked ear) but within 20-30 seconds it is noticeably out of sync, with the analog audio (form my FM radio) running around a half second ahead of the HDMI output (my main speakers).
    So - where to begin finding where the sync problem is? The receiver? Conversions between 44Khz and 48Khz?
    Any help much appreciated - google-foo hasn't turned up anything obvious so far.

    Yeah - that was my thought - a very difficult, and probably insoluble problem as it stands. I can't just mute one of the devices as that would defeat the purpose of having multi-room music! Fortunately it's not too noticeable usually, as you can't usually hear the main stereo and the FM radios at the same time, unless you're standing in the right part of the house
    The analog splitter cable not really a goer, since running clean, crisp multi-channel HDMI with pass through when needed is the essential goal of the HTPC. So unless I was to switch inputs and or unplug cables...
    What I will end out doing, in the absence of a software solution, is hooking the FM transmitter directly to my receiver. I was going to just use the headphone-out jack of the receiver to feed audio to the FM transmitter, but the stoopid receiver can't output audio to external speakers at the same time as the headphone is plugged. To overcome this, I'll probably run a headphone amp off the receiver's RCA outputs, into the FM transmitter. Like this one: http://headamp.com/portable_amps/ae2/, or this one: http://www.amazon.com/Rolls-HA43-Headph … B00102ZOQC
    Last edited by sultanoswing (2013-11-13 06:15:11)

  • HT203167 I am watching a TV show and I get video but no audio. I'm using HDMI output to my TV monitor.  It worked yesterday just fine

    I downloaded a TV show and am unable to get audio from my pc to the TV monitor using HDMI output.  It worked fine yesterday with the same tv show download.  Video/Audio is ok to my pc and video is getting to tv monitor.  Everything is the same but, can't find the audio. This is my first time doing a iTunes download so any help is appreciated by this rookie.

    Hello Quincy B,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iTunes and QuickTime for Windows: Audio does not play or plays incorrectly
    http://support.apple.com/kb/TS1362
    Best of luck,
    Mario

  • What is "Analog Output - Built-in Audio"?

    Hi,
    In Gnome System Settings -> Sound there are three pulse sinks: HDMI (Built-in Audio), Speakers (Built-in Audio), and Analog Audio (Built-in Audio).
    When I plug-in headphones into the laptop, "Speakers" change to "Headphones". The behavior is what I want, but I was just confused as to what "Analog Audio" does? As far as I can tell it doesn't do anything. In Ubuntu 13.10 I didn't have the Analog Audio sink.
    Last edited by SimFox3 (2014-01-07 01:48:31)

    # 'pactl list'. Again the analog-stereo port is the one I need to know more info about:
    analog-input-internal-mic: Internal Microphone (priority: 8900, latency offset: 0 usec)
                            Properties:
                                    device.icon_name = "audio-input-microphone"
                            Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:hdmi-stereo+input:analog-stereo, output:hdmi-stereo-extra1+input:analog-stereo, output:hdmi-surround-extra1+input:analog-stereo
                    analog-input-mic: Microphone (priority: 8700, latency offset: 0 usec, not available)
                            Properties:
                                    device.icon_name = "audio-input-microphone"
                            Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:hdmi-stereo+input:analog-stereo, output:hdmi-stereo-extra1+input:analog-stereo, output:hdmi-surround-extra1+input:analog-stereo
                    analog-output: Analog Output (priority: 9900, latency offset: 0 usec)
                            Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
                    analog-output-speaker: Speakers (priority: 10000, latency offset: 0 usec, not available)
                            Properties:
                                    device.icon_name = "audio-speakers"
                            Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
                    analog-output-headphones: Headphones (priority: 9000, latency offset: 0 usec, available)
                            Properties:
                                    device.icon_name = "audio-headphones"
                            Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
                    hdmi-output-0: HDMI / DisplayPort (priority: 5900, latency offset: 0 usec, available)
                            Properties:
                                    device.icon_name = "video-display"
                                    device.product.name = "ASUS PB278"
                            Part of profile(s): output:hdmi-stereo, output:hdmi-stereo+input:analog-stereo
                    hdmi-output-1: HDMI / DisplayPort 2 (priority: 5800, latency offset: 0 usec, not available)
                            Properties:
                                    device.icon_name = "video-display"
                            Part of profile(s): output:hdmi-stereo-extra1, output:hdmi-stereo-extra1+input:analog-stereo, output:hdmi-surround-extra1, output:hdmi-surround-extra1+input:analog-stereo
    # dmesg | grep sound - doesn't list anything to do with analog.
    [    3.920668] input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
    [    3.921853] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11
    [    3.922829] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10
    [    3.923004] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input

  • The old Apple TV had a port for Analog the new one does not.  Where do I find a (TosLink), Optical to Analog Audio for the Optical Output on the Apple TV so I can run my Analog outside speakers?

    Where do I find a TosLink, Optical to Analog Audio for the Optical Output on the Apple TV 2? 

    click here for information.

  • Can I use two FP-AO-210'​s and one FP-1000 to obtain 16 channels of analog output?

    Hello All,
    I'm new to both Fieldpoint and LabVIEW.
    I'm developing a control system that requires at least 9 channels of analog-only output. I have been trying to connect two FP-AO-210's to a single FP-1000 by connecting one FP-AO-210 directly to the FP-1000, and the second FP-AO-210 to the first FP-AO-210. However, Fieldpoint Explorer only detects the network interface and the first analog output module.
    Is this configuration correct? Or, do I need a FP-1001 in order to use a second FP-AO-210?
    Does anyone have any alternate suggestions on how to obtain at least 9 channels of analog output?
    Thanks,
    Eric W

    Eric,
    One FP-1000 (or FP-1001/160X/20XX) can control up to 9 IO modules. If the second FP-AO-210 is not being detected by FieldPoint Explorer there are a couple things to check. First check to make sure that all of the terminal bases and modules are firmly connected to each other.
    Next, check the Power & Ready LED of the FP-AO-210 at address 2. Both LEDs should be lit. If they are not, de-power the system, remove the modules and terminal bases and make sure that you do not have any bent pins. Re-assemble and power up the system. Use FieldPoint Explorer again.
    If the module is still not detected, take a look at the addressing of the detected modules. The system should be detecting the first FP-AO-210 at address 1 (or 1 + a multiple of 10 if you have s
    et the FP-1000 to a different address). If the FP-AO-210 is at a different address, then it is likely a problem with the addressing circuitry either in the network module or the terminal base. Try swapping the positions of the two terminal bases and try again. If it works, then the error is in the addressing circuitry of the terminal base, if not, then it is in the addressing circuitry of the network module. Note: bent pins can also cause this.
    Regards,
    Aaron

  • How can I use two analog output channels simultaneously?

    I am using PCI6110 DAQ card. I want to run two separate VIs on one computer. Each VI output a waveform to one analog output channel. How can I do this simultaneously without interfering each other?
    Thanks

    Hi Stephen,
    This can NOT be done with two seperate VI's.
    The issue is in the hardware/driver.
    Your hardware has a clock that controls how fast updates to the AO occur. That clock can only have one value at a time. I will let your contemplate the complications that come up with two different clock settings being active at the same time (see below).
    So how do you work around this complication?
    You will have to develop a single VI that OWNs both output channels. That VI will have to accept start,stop,configure, etc commands from the two clients (what you will have to convert your existing VI's into). If you decide to place a restriction on the services you provide to the clients along the line of "only one sample rate at a time" you will be making your li
    fe much easier.
    If I was contracted by a customer to do what you have asked, I would try to combine the two existing VI's into one or simply buy a second 6110 and avoid all of the hassles. Both of these approaches would end up saving the customer money in the long run while freeing them of any restrictions that where established in order to develop the "server".
    I hope this helps,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for