≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Access violation when reading data
Posted by:
(you are not logged in)
Enter the missing letter in: "In?ernational"
(you are not logged in)
Text:
[quote][b]bogdan314[/b] wrote: Hi everybody, I'm having troubles copying data from a .OGG sound file. I'm getting access violation reading memory 0x...., and here is my code: ISoundEngine* engine = createIrrKlangDevice(); ISoundSource* fan = engine->addSoundSourceFromFile(filename,ESM_NO_STREAMING,false); void* fanData = fan->getSampleData(); SAudioStreamFormat format = fan->getAudioFormat(); int data_sample_number = format.getSampleDataSize(); int data_sample_size = format.getSampleSize(); int data_size = data_sample_number * data_sample_size; unsigned char* newData = new unsigned char[data_size]; printf("Trying to copy data..."); for (int i=0; i<data_size; i++) { newData[i] = *((unsigned char*)fanData+i); }[/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