≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
join wav files
Posted by:
(you are not logged in)
Enter the missing letter in: "Internati?nal"
(you are not logged in)
Text:
[quote][b][/b] wrote: SelbstgesprÃĪche... In case someone needs it in the future - the trick with the audio artifacts was to use memset on the allocated buffers before filling them with other stuff . This part of the function below should get anyone on the right track that wants to add a buffer-wav of x-length to their preexisting wav. Great API ! by the way // that here is the formular to compute the length of the data segment in the buffer wav unsigned long dataLen2 = format1.SampleRate * format1.ChannelCount * format1.getSampleSize() * seconds; char* emptybuf = new char[dataLen2]; // lets create a bigbuffer, so we can attach the seconddatabuffer to the first. char* bigbuffer = new char[dataLen1+dataLen2]; //sizeof(emptybuf)]; // prevents audio artifacts !! - very important memset(bigbuffer,0,dataLen1+dataLen2); memset(emptybuf,0,dataLen2); char* firstbuffer = (char*)data1; char* secondbuffer = emptybuf; int counter1=0; int counter2 =0; while(counter1 < dataLen1 ) { bigbuffer[counter1] = firstbuffer[counter1]; // * x increases volume counter1++; } while(counter1 < dataLen1+dataLen2) { bigbuffer[counter1] = secondbuffer[counter2]; counter1++; counter2++; } dataLen2 = dataLen1+dataLen2; totalLen1 = waveHeaderLen1 + dataLen2;[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact