0
0

I’m making a class ([url=http://home.tiscali.nl/tanaskoski/FMODSoundWithAPE_FLAC.zip:ca6avvop]Download here[/url:ca6avvop]) that lets you play APE files with FMOD :D. It’s easy to use and uses FSOUND_Stream_Create.
You will need the Monkey’s Audio SDK to compile. (freely available: [url:ca6avvop]http://www.monkeysaudio.com[/url:ca6avvop])
Now i’d like to know if someone has got FLAC (using libFlac(++) working with FMOD :roll:?

thanks in advance

Chris

  • You must to post comments
0
0

plz inform to me
VB6 bas Module for FSOUNDStream.dll

or doc like FMOD sdk

i’m try to paly ape in my player

thank you

  • You must to post comments
0
0

KarLKoX, I need MPC_Reader.h to compile but it isn’t in the archive.

  • You must to post comments
0
0

hi,

my visual basic (and i don’t have it) isnt very good but, maybe you can convert the included .pas file?

i’m just 15 so don’t expect a well-coded bugfree dll ๐Ÿ˜‰

good luck

  • You must to post comments
0
0

oups ! ๐Ÿ˜ณ
Archive is updated :)

  • You must to post comments
0
0

Still doesn’t compile: (probably my fault )
[quote:27vyzhoq]
—— Build started: Project: MTray, Configuration: Debug Win32 ——

Compiling…
MTray.cpp
d:\Docs\Chris\Visual Studio Projects\MTray\MPC\mpc_dec.h(231) : warning C4267: ‘return’ : conversion from ‘size_t’ to ‘int’, possible loss of data
d:\Docs\Chris\Visual Studio Projects\MTray\MPC_Reader.h(32) : warning C4267: ‘+=’ : conversion from ‘size_t’ to ‘int’, possible loss of data
d:\Docs\Chris\Visual Studio Projects\MTray\MTray.cpp(90) : warning C4311: ‘type cast’ : pointer truncation from ‘char *’ to ‘int’
d:\Docs\Chris\Visual Studio Projects\MTray\MTray.cpp(113) : warning C4311: ‘type cast’ : pointer truncation from ‘HINSTANCE’ to ‘UINT’
fmodfunc.cpp
d:\Docs\Chris\Visual Studio Projects\MTray\MPC\mpc_dec.h(231) : warning C4267: ‘return’ : conversion from ‘size_t’ to ‘int’, possible loss of data
d:\Docs\Chris\Visual Studio Projects\MTray\MPC_Reader.h(32) : warning C4267: ‘+=’ : conversion from ‘size_t’ to ‘int’, possible loss of data
d:\Docs\Chris\Visual Studio Projects\MTray\fmodfunc.cpp(667) : warning C4244: ‘=’ : conversion from ‘FLAC__uint64’ to ‘int’, possible loss of data
d:\Docs\Chris\Visual Studio Projects\MTray\fmodfunc.cpp(676) : warning C4244: ‘=’ : conversion from ‘double’ to ‘int’, possible loss of data
d:\Docs\Chris\Visual Studio Projects\MTray\fmodfunc.cpp(687) : warning C4800: ‘signed char’ : forcing value to bool ‘true’ or ‘false’ (performance warning)
d:\docs\chris\visual studio projects\mtray\fmodfunc.cpp(682) : warning C4715: ‘FSOUNDStream::GetStreamProperties’ : not all control paths return a value
Linking…
Creating library Debug/MTray.lib and object Debug/MTray.exp
LINK : warning LNK4098: defaultlib ‘LIBCMT’ conflicts with use of other libs; use /NODEFAULTLIB:library
fmodfunc.obj : error LNK2019: unresolved external symbol “public: void __thiscall MPC_decoder::UpdateBuffer(unsigned int)” (?UpdateBuffer@MPC_decoder@@QAEXI@Z) referenced in function “int __cdecl MPC_UpdateBuffer(void *)” (?MPC_UpdateBuffer@@YAHPAX@Z)
fmodfunc.obj : error LNK2019: unresolved external symbol “public: int __thiscall MPC_decoder::DECODE(short *)” (?DECODE@MPC_decoder@@QAEHPAF@Z) referenced in function “int __cdecl MPC_UpdateBuffer(void *)” (?MPC_UpdateBuffer@@YAHPAX@Z)
fmodfunc.obj : error LNK2019: unresolved external symbol “public: int __thiscall MPC_decoder::FileInit(void)” (?FileInit@MPC_decoder@@QAEHXZ) referenced in function __catch$?OpenMedia@FSOUNDStream@@QAE?AUFMODSTREAMINFO@@PAD@Z$0
fmodfunc.obj : error LNK2019: unresolved external symbol “public: void __thiscall MPC_decoder::SetStreamInfo(class StreamInfo *)” (?SetStreamInfo@MPC_decoder@@QAEXPAVStreamInfo@@@Z) referenced in function __catch$?OpenMedia@FSOUNDStream@@QAE?AUFMODSTREAMINFO@@PAD@Z$0
fmodfunc.obj : error LNK2019: unresolved external symbol “public: void __thiscall MPC_decoder::RESET_Synthesis(void)” (?RESET_Synthesis@MPC_decoder@@QAEXXZ) referenced in function __catch$?OpenMedia@FSOUNDStream@@QAE?AUFMODSTREAMINFO@@PAD@Z$0
fmodfunc.obj : error LNK2019: unresolved external symbol “public: void __thiscall MPC_decoder::RESET_Globals(void)” (?RESET_Globals@MPC_decoder@@QAEXXZ) referenced in function __catch$?OpenMedia@FSOUNDStream@@QAE?AUFMODSTREAMINFO@@PAD@Z$0
fmodfunc.obj : error LNK2019: unresolved external symbol “public: __thiscall MPC_decoder::MPC_decoder(class Reader *)” (??0MPC_decoder@@QAE@PAVReader@@@Z) referenced in function __catch$?OpenMedia@FSOUNDStream@@QAE?AUFMODSTREAMINFO@@PAD@Z$0
fmodfunc.obj : error LNK2019: unresolved external symbol “public: int __thiscall StreamInfo::ReadStreamInfo(class Reader *)” (?ReadStreamInfo@StreamInfo@@QAEHPAVReader@@@Z) referenced in function __catch$?OpenMedia@FSOUNDStream@@QAE?AUFMODSTREAMINFO@@PAD@Z$0
fmodfunc.obj : error LNK2019: unresolved external symbol “public: void __thiscall StreamInfo::SetFilename(char const *)” (?SetFilename@StreamInfo@@QAEXPBD@Z) referenced in function __catch$?OpenMedia@FSOUNDStream@@QAE?AUFMODSTREAMINFO@@PAD@Z$0
fmodfunc.obj : error LNK2019: unresolved external symbol “public: void __thiscall StreamInfo::Clear(void)” (?Clear@StreamInfo@@QAEXXZ) referenced in function __catch$?OpenMedia@FSOUNDStream@@QAE?AUFMODSTREAMINFO@@PAD@Z$0
fmodfunc.obj : error LNK2019: unresolved external symbol “public: __thiscall StreamInfo::StreamInfo(void)” (??0StreamInfo@@QAE@XZ) referenced in function “public: struct FMODSTREAMINFO __thiscall FSOUNDStream::OpenMedia(char *)” (?OpenMedia@FSOUNDStream@@QAE?AUFMODSTREAMINFO@@PAD@Z)
fmodfunc.obj : error LNK2019: unresolved external symbol “public: int __thiscall MPC_decoder::perform_jump(int)” (?perform_jump@MPC_decoder@@QAEHH@Z) referenced in function “public: signed char __thiscall FSOUNDStream::SetTime(struct FMODSTREAMINFO,int)” (?SetTime@FSOUNDStream@@QAECUFMODSTREAMINFO@@H@Z)
fmodfunc.obj : error LNK2019: unresolved external symbol “public: __thiscall MPC_decoder::~MPC_decoder(void)” (??1MPC_decoder@@QAE@XZ) referenced in function “public: void * __thiscall MPC_decoder::`scalar deleting destructor'(unsigned int)” (??_GMPC_decoder@@QAEPAXI@Z)
Debug/MTray.exe : fatal error LNK1120: 13 unresolved externals

Build log was saved at “file://d:\Docs\Chris\Visual Studio Projects\MTray\Debug\BuildLog.htm”
MTray – 14 error(s), 11 warning(s)

———————- Done ———————-

Build: 0 succeeded, 1 failed, 0 skipped

[/quote:27vyzhoq]
I’m using MS VS .NET

  • You must to post comments
0
0

Very nice :)
Btw, you can change :

[code:2dt028o5]
char *FileExt = (char *)malloc(_MAX_EXT);
_splitpath(FileName,NULL,NULL,NULL,FileExt);
[/code:2dt028o5]

by

[code:2dt028o5]
char *FileExt = strrchr(FileName, ‘.’);
[/code:2dt028o5]

It save one call and remove a memory leak (there is no free nor a delete after the malloc, same thing for the APEBuffer).

I never tried to add third parties codec to fmod but i read (a long time ago) someone who successfully add Flac support to Fmod (see [url=http://www.fmod.org/forum/viewtopic.php?t=1519&highlight=:2dt028o5]here[/url:2dt028o5] )

  • You must to post comments
0
0

It seems you didn’t add the sourcecode of MPC (wich is in the MPC directory) to your project ๐Ÿ˜‰

  • You must to post comments
0
0

[quote="KarLKoX":3cm73kqq]Very nice :)
Btw, you can change :

[code:3cm73kqq]
char *FileExt = (char *)malloc(_MAX_EXT);
_splitpath(FileName,NULL,NULL,NULL,FileExt);
[/code:3cm73kqq]

by

[code:3cm73kqq]
char *FileExt = strrchr(FileName, ‘.’);
[/code:3cm73kqq]
[/quote:3cm73kqq]
You’re right ๐Ÿ˜‰

[quote:3cm73kqq]
I never tried to add third parties codec to fmod but i read (a long time ago) someone who successfully add Flac support to Fmod (see [url=http://www.fmod.org/forum/viewtopic.php?t=1519&highlight=:3cm73kqq]here[/url:3cm73kqq] )[/quote:3cm73kqq]
hmm. interesting, but the code doesn’t seems to be complete :(

EDIT:
[quote="brett":3cm73kqq]i actually wrote to the APE guy (no reply). I told him his code was a mess. Its nearly impossible to port to anything. very windows oriented.

we added flac support to fmod4 as a plugin, but as for APE, no way.[/quote:3cm73kqq]
Yeh.. there are many complaints about the portablity of APE but there are some unofficial ports to MAC OS X and Linux
Mac OS: http://www.monkeysaudio.com/cgi-bin/YaB … 7&start=45
Linux:
http://www.monkeysaudio.com/cgi-bin/YaB … 1047686493
But probably they are a lot slower than the original. :(

  • You must to post comments
0
0

i assume it is c class, is there any way to use it in VB?
and please don’t tell me it is time to port into C

  • You must to post comments
0
0

I’ve updated the class and added FLAC support. ๐Ÿ˜€
To compile you will need the new monkey sdk(3.99). For anyone whose interested.
[url=http://home.tiscali.nl/tanaskoski/FMODSoundWithAPE_FLAC.zip:2vux1j20]Down. Here[/url:2vux1j20]

  • You must to post comments
0
0

[quote="KarLKoX":2e0jlu0k]It seems you didn’t add the sourcecode of MPC (wich is in the MPC directory) to your project ;)[/quote:2e0jlu0k]
๐Ÿ˜ณ (i’m stupid ;)) but now i get:
[quote:2e0jlu0k]Compiling…
fmodfunc.cpp
fmodfunc.cpp(717) : fatal error C1010: unexpected end of file while looking for precompiled header directive
synth_filter.cpp
MPC\synth_filter.cpp(532) : fatal error C1010: unexpected end of file while looking for precompiled header directive
requant.cpp
MPC\requant.cpp(83) : fatal error C1010: unexpected end of file while looking for precompiled header directive
mpc_dec.cpp
MPC\mpc_dec.cpp(1254) : fatal error C1010: unexpected end of file while looking for precompiled header directive
in_mpc.cpp
MPC\in_mpc.cpp(201) : fatal error C1010: unexpected end of file while looking for precompiled header directive
idtag.cpp
MPC\idtag.cpp(1788) : fatal error C1010: unexpected end of file while looking for precompiled header directive
huffsv46.cpp
MPC\huffsv46.cpp(231) : fatal error C1010: unexpected end of file while looking for precompiled header directive
huffsv7.cpp
MPC\huffsv7.cpp(463) : fatal error C1010: unexpected end of file while looking for precompiled header directive
bitstream.cpp
MPC\bitstream.cpp(167) : fatal error C1010: unexpected end of file while looking for precompiled header directive

Build log was saved at “file://d:\Docs\Chris\Visual Studio Projects\MTray\Release\BuildLog.htm”
MTray – 9 error(s), 0 warning(s)

———————- Done ———————-

Build: 0 succeeded, 1 failed, 0 skipped[/quote:2e0jlu0k]

Aceton: I don’t think it’s possible to port directly to VB, but through a dll it’s possible i guess

  • You must to post comments
0
0

I ve updated the sourcecode with these changes (only Flac related):

  • Added GetTime, SetTime, GetLengthMs functions,
  • Added a simple example showing the use of the addon,
  • Check for decoder error,
  • You malloced in a callback resulting in a serious memory leak : each time the function is called, you consume more and more memory. Fixed.
  • Removed the ATL dependency using the MultiByteToWideChar API.

You can find the archive [url=http://sbougribate.free.fr/Files/FMOD/FMODSoundWithAPE_FLAC-0.3.rar:q74kvfiy]here[/url:q74kvfiy].

PS : i am more C than C++ so if you find weird things … :roll:

  • You must to post comments
0
0

Remove all stdafx/mfc dependencies in the project’s settings.

  • You must to post comments
0
0

thanks for the fixes. ๐Ÿ˜€ This is my first real c++ class and i am still learning the language (c++ is so hard :()

  • You must to post comments
0
0

[quote="KarLKoX":1j4bogt0]Remove all stdafx/mfc dependencies in the project’s settings.[/quote:1j4bogt0]
That was fast :D, it works now, MPC works good for me. But i will put it in a thread

  • You must to post comments
0
0

KarLKoX,i modified the code again so the time functions work correct if you play multiple FLAC files. ๐Ÿ˜‰

http://home.tiscali.nl/tanaskoski/FMODS … E_FLAC.zip

edit: fixed (made a stupid mistake in time functions :oops:) and re-uploaded again. and made a example quickly (win32 gui app):
http://home.tiscali.nl/tanaskoski/APEFLACExample.zip

  • You must to post comments
0
0

ok MPC decoding is in a thread now (is it better???) and i changed the code a lot so that you can play multiple MPC’s,FLAC’s,APE’s at once. The decoding buffers and variables are now in the ****STREAMINFO (i thought it was safer to seperate them).

  • You must to post comments
0
0

A small update [url=http://sbougribate.free.fr/Files/FMOD/FMODSoundWithAPE_FLAC.rar:10zbg6gp]here[/url:10zbg6gp] with MPC (MusePack) support.

Chris>there is some sync decoding pb, putting the MPC_UpdateBuffer in a thread migh help but i don’t have a lot of free time to do it by myself :)

  • You must to post comments
0
0

๐Ÿ˜ณ i made stupid mistake, MPC-files didn’t open, i fixed it and re-uploaded the zip. i added a dll for Delphi (+unit file) .
it might work for VB but i haven’t tested it yet

  • You must to post comments
0
0

[quote="KarLKoX":1um1nvm0]A small update [url=http://sbougribate.free.fr/Files/FMOD/FMODSoundWithAPE_FLAC.rar:1um1nvm0]here[/url:1um1nvm0] with MPC (MusePack) support.
[/quote:1um1nvm0]

Thanks ๐Ÿ˜€

[quote:1um1nvm0]
Chris>there is some sync decoding pb, putting the MPC_UpdateBuffer in a thread migh help but i don’t have a lot of free time to do it by myself :)[/quote:1um1nvm0]
I’ll try this ๐Ÿ˜‰

  • You must to post comments
Showing 20 results
Your Answer

Please first to submit.