Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6387479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:09:26+00:00 2026-05-25T03:09:26+00:00

I am trying to display audio at real time using, analoginput, this is the

  • 0

I am trying to display audio at real time using, analoginput, this is the code:

function Cspe()

    daq_object = analoginput('winsound');
    chan = addchannel(daq_object,1);
    num_samples=1000;

    set(daq_object,'SamplesPerTrigger',inf,'SamplesAcquiredFcnCount',num_samples,...
       'SamplesAcquiredFcn',{@up,num_samples});

    if(strcmp(daq_object.running,'On'))
        return;
    else
        start(daq_object);
end

end

function up(num_samples)
    data=getdata(daq_object,num_samples);
    a=[1:num_samples];
    plot(a,data);
    drawnow;
end

but it keeps on giving me errors saying Winsound is already in use. i am not so sure what the problem is?, i made sure that if the device is on/running, don’t do anything.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:09:26+00:00Added an answer on May 25, 2026 at 3:09 am

    I am not sure how to just add a comment (or if I am just not able to yet)so here is my ‘answer’:

    I had a similar problem with a data acquisition board using windows 7. The way to usually get around this problem is making sure you run the program as an administrator.

    In windows 7 to do this you simply right click on your shortcut and select ‘Run as administrator’ or change the advanced properties of the shortcut to run the program as an administrator.

    If you are in windows XP, you may want to check to see if your user account has administrative privileges (i.e. check Control Panel > Users, or just try and write something to a system folder).

    If these do not work, then another program is likely using the sound card, this has sometimes happened with certain audio suites for me, and was solved by exiting the programs (or uninstalling them, possibly).

    I realize this is long after the question was posted, but maybe this will be useful to someone else!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to display current time with PHP (using this ): $date = date('m/d/Y h:i:s
I'm trying to save a sound as a ringtone in Android using this code.
I've been trying to display text using a Quartz context, but no matter what
first time trying XNA Framework in C#.. followed this tutorial: http://www.uxmagic.com/blog/post/2010/08/17/e2809cHello-Worlde2809d-for-XNA-Game-Studio-40.aspx Everything's ok until
Trying to display structExcelResult[strUrl] created by the function on my .cfm page. <cffunction name=getBuyerReport
I am trying to display random images heres my code private void Page_Load(object sender,
When trying to display a byte stream from HLDS (Half-Life Dedicated Server) in a
I'm trying to display a series of titles varying from 60 characters to 160
I am trying to display a list of all files found in the selected
I'm trying to display a loading icon while my iPhone app downloads a network

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.