English
Forum

Fmod.dll ,Sound from Ressource loading

 

Johannes
Meyer
Grüßt you , I hope someone can me help on.

i'm momentarily thereby me in Fmod.dll einzuarbeiten. now have I a place where I do not weiterkommen .
possible has who a idea.

i will the The fmod.dll The Sounds from memory(Ressource) fetch for too The definition.

Def &FMOD_OPENMEMORY $800

Api commands:
'FMOD_System_CreateStream(Systemb&,"Sound", &FMOD_OPENMEMORY, 0, Addr(Soundb&))

with the commands should one then whom Sound read from memory only a thing is me unclear
what those in the api Help write versteh I do not :/

fashion whom I mitgebe the api function.
FMOD_OPENMEMORY
"name_or_data" wants be interpreted as a pointer to memory instead of filename for creating sounds. Use FMOD_CREATESOUNDEXINFO to specify length.

here yet short The parameter for function supra everybody can mitgeben can.

Quote:
Parameters

name_or_data
name of the file or URL to open. For CD playback this may be a drive letter with a colon, example "D:".

fashion
Behaviour modifier for opening the sound. sea FMOD_MODE. means sea remarks for more.

exinfo
Pointer to a FMOD_CREATESOUNDEXINFO which lets the user provide extended information while playing the sound. Optional. Specify 0 or NULL to ignore.

sound
Address of a variable to receive a newly created FMOD::Sound object.
funkitionier everything only Have no ahnugn How I the now The address give for Ressource.
loudly support should the so weg with "FMOD_OPENMEMORY"

part is the the statement from the Api Help from the fmod.dll

would be Real calm if who ne idea has ;)

Greeting and thanks.
 
XProfan X2
Win7 Home Premium, SP1, Core(TM) i5-2400 @ 3.10GHz

Gruß,
Johannes

Programmiert in Profan X2
(Release) Gravity the Game
11/16/12  
 




Johannes
Meyer
has here no a idea How one in Profan a Pointer How one it from C++ knows using ?

Have here the whole as C++ code found Perhaps can the Yes who übersetzten

Code:

void LoadFileIntoMemory(const char *name, void **buff, int *length)
{
FILE *fp = fopen(name, "rb");

fseek(fp, 0, SEEK_END);
*length = ftell(fp);
fseek(fp, 0, SEEK_SET);

*buff = malloc(*length);
fread(*buff, *length, 1, fp);

fclose(fp);
}

LoadFileIntoMemory("../media/drumloop.wav", &buff, &length);
memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO));
exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
exinfo.length = length;

result = FMOD_System_CreateSound(system, (const char *)buff, FMOD_HARDWARE | FMOD_OPENMEMORY, &exinfo, &sound1);
 
XProfan X2
Win7 Home Premium, SP1, Core(TM) i5-2400 @ 3.10GHz

Gruß,
Johannes

Programmiert in Profan X2
(Release) Gravity the Game
11/17/12  
 



You can still Pointern until Umfallen -

with Dim beget such memory and the Variablenwert corresponds to the Pointer.
CompileMarkSeparation
declare myMem#
dim myMem#,1024//1024 byte speicher holen
meineAPI(addr(myMem#))//Pointenre>

Addr(s$) supply too The address the Bytes in the string.
 
11/17/12  
 




Johannes
Meyer
@If ok thanks, the known I do not . Have so not yet so worked ;)
means with Speicherzuweisung etc.
 
XProfan X2
Win7 Home Premium, SP1, Core(TM) i5-2400 @ 3.10GHz

Gruß,
Johannes

Programmiert in Profan X2
(Release) Gravity the Game
11/17/12  
 




Johannes
Meyer
has Done ;)
 
XProfan X2
Win7 Home Premium, SP1, Core(TM) i5-2400 @ 3.10GHz

Gruß,
Johannes

Programmiert in Profan X2
(Release) Gravity the Game
11/18/12  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

5.150 Views

Untitledvor 0 min.
Gast.081509/06/24
Member 862464105/18/24
H.Brill12/28/21
Jörg Sellmeyer03/20/20
More...

Themeninformationen

this Topic has 2 subscriber:

Johannes Meyer (4x)
iF (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie