Results 1 to 2 of 2

Thread: Beginnings of an audio loop

  1. #1
    Junior Member
    Join Date
    Sep 2010
    Posts
    1

    Beginnings of an audio loop

    Hi Guys,

    recently, I started a project in which I'm planning to do an audio loop an the GPU to filter audio samples from my soundcard on the GPU.

    My first step was to see how to write the samples to the device memory and write them back to my soundcard. I did this, for comparison on the host memory too (store the samples in a buffer and write them back).

    In OpenCL (for GPU processing) I'm using "clEnqueueWriteBuffer" to write the data to the device memory and "clEnqueueReadBuffer" to read it from there.
    When I just write and read the soundcard samples I've got the problem, that every 300 - 500 loops the writing and reading-command takes 10 times more then in all other loops, so I got some scratch errors every few seconds in my output from the soundcard. I printed out the execution time of the loop, and in these loops its bigger then the given amount of time for one loop (256 samples / 44100 Hz = 5.3 ms).

    I suggest, that this is a synchronization problem, but I don't have a clue how to solve it. I'm using blocking read/write so I thought it should be synchronized.

    Does anybody have an idea why I got these execution time differences every 300 - 500 loops?

  2. #2
    Member
    Join Date
    Mar 2010
    Location
    Raleigh, NC
    Posts
    55

    Re: Beginnings of an audio loop

    Are you releasing the memory/buffer after you read it back? My theory would be that, depending on your problem size, memory, etc., you could be writing and filling up the device memory, and every 300-500 loop cycles, it needs to flush the memory and give you more space.

Similar Threads

  1. for loop problem
    By arthur.sw in forum OpenCL
    Replies: 4
    Last Post: 03-23-2011, 07:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •