• Welcome to Dark Bit Factory & Gravity.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - ChipWarrior

#1
Quote from: Clyde on February 04, 2010
:hi:

Have you got it to play music dude?
If you want a hand I'll have a look into it for you.

thx man i will come back for that another time  ;D really great forum here thanks for all you help meights without you i wouldent have make it!
so i finally got it r1ght, the problem was that i got in trouble with this peace of code:


            BASSMOD_Init(-1, 44100, 0); //device, bitrate, flag
            BASSMOD_MusicLoad(false, "CORE.MOD", 0, 0, BASS_MUSIC_LOOP);
            BASSMOD_MusicPlay();


i thougt i have to declare the funktions in the header like the codesnippets in de manual but i finaly understand this hole .dll thing xD
so then my compiler bug me out with:
Quotefatal error LNK1313: ijw/native-Modul gefunden. Es kann kein Link mit pure-Modulen hergestellt werden.
//says: cannot link to pure-modules
and then i could make it run when i change my compiler settings from /clr:pure to /clr and my programm is finaly playing musik :clap:

so here is the code for an empty form in visual c++ for a clr projekt that plays a .mod file named core.mod

#include "stdafx.h"
#include "Form1.h"
#include "bassmod.h"


#pragma comment( lib, "bassmod.lib" )


using namespace projekt;


[STAThreadAttribute]
int main(array<System::String ^> ^args)
{   

        if( BASSMOD_Init ( -1, 44100, 0 ) == false)
       {
        MessageBox::Show( "Coud not Init BASS" );
        }

        if(BASSMOD_MusicLoad ( FALSE, "core.mod", 0, 0, BASS_MUSIC_LOOP ) == false)
        {
        MessageBox::Show ( "Could not laod the Music File" );
        }

        if( BASSMOD_MusicPlay( ) == false)
        {
        MessageBox::Show ( "Can not Play the Music File" );
        }

       Application::EnableVisualStyles();
       Application::SetCompatibleTextRenderingDefault(false);

       Application::Run(gcnew Form1());
     
    return 0;
}
#2
Hey THX for the warm Welcome!

Yes i Code sinde 1,5 Years in C++ most in Console Application but since a half Year in GUI Applications...
I read about the bassmod.lib and how to import a DLL and i "think" i got it straight but i am not very sure, bc0z its the First time i do so... At least the Code Compiles with no Error...

Its not really a Demo now just a Tool with some Keygen-Flavor but i wanna Develop for the Demoscene in the Feature, i am since 3 Years huge Fan of the Scene, and will particpate in the Future, but as i say i am a total n00b in GUI Coding but MS VC++ takes a lot Work from me...

So another Question:

For Demos it is better to Code managed C++ or Win32 WINAPI?
#3
Hi There!

I searched my ass of for a Tutorial on bassmod on Visual C++ but i cant get it 2 work :(

So ich found this Forum and see some Interest stuff around here and just reg me bc0z i wanna learn more about Demoscene...

So i thougt i start with the Basics: C++ with Classes and Co ist no big deal but i am Wondering wit that bassmod DLL... i cant get it to work, i just wanna Play an .XM File inmy Application like a Keygen.

I tried PlaySounds() but this doesent Work either and when will call InitAndPlay() for Bassmod it just says unknown Variable... :-/

So anyone wanna help me to get some qewl Chiptunes in my Application?