Author Topic: Recording  (Read 3606 times)

Richard_b

  • Posts: 28
Recording
« on: 31 Mar '03 - 13:53 »
Im trying to record with Bass..and i get the callback function..works fine..how do I reterive the data to write to a file? All i get from buffer is a long integer? How do I retrive the samples...its probably BLINDINGLY obvuious..but I cant see it!



Irrational86

  • Posts: 960
Re: Recording
« Reply #1 on: 31 Mar '03 - 15:36 »
Quote

its probably BLINDINGLY obvuious..but I cant see it!

:laugh: :laugh: :laugh: :laugh: I like your comment!! hehehe...anyways...

First of all, specify the programming language you are using. The buffer is not a long integer, its a pointer to an array of "length" (length is a parameter in the callback function) items in the array. Depending on the recording format, 16bit Stereo, 8Bit mono, etc...is the type of data the array will contain, ask if you need more help.

Richard_b

  • Posts: 28
Re: Recording
« Reply #2 on: 31 Mar '03 - 16:09 »
Well I knew it was obvious!!!!!! OK Im using VB6, and I dont know how to retrieve data from a memory pointer!!! is it possible?

Irrational86

  • Posts: 960
Re: Recording
« Reply #3 on: 1 Apr '03 - 05:33 »
Uhhhh...VB, thats out of my league, I used to use VB, but now i know the basic stuff only. Anyways, why dont you take a look at the VB "rectest" that comes in the Bass package, it shows how to write it to memory, but shouldnt be that hard to modify it into writting to a file :)

Azoth

  • Posts: 108
Re: Recording
« Reply #4 on: 2 Apr '03 - 01:45 »
Richard_b,
 Are you planning on recording for a long period of time? This would be the only reason I would suggest writing to a file during the RecordingCallback routine, as there is alot of overhead in disk I/O and if the writing fails or generates an error for some reason in the callback routine, VB WILL crash! If this is what you are looking to do let me know as I started something similar a while ago and can send it to ya.

.Azoth.

Richard_b

  • Posts: 28
Re: Recording
« Reply #5 on: 2 Apr '03 - 06:32 »
I was hoping to write to disk..only because generating 44.1K samples wav files..can get large and writing to disk gets round problems with memory sizes....Id like to see how you have donre it if poss.