Author Topic: OR audio (Bass.dll)  (Read 10030 times)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
OR audio (Bass.dll)
« on: October 09, 2019, 07:46:04 pm »
Here is the ZIP file to sync your code with mine.


#playaudio Back_to_Amiga_roots_(1992).mod 50 loop

Audio extension supported: ".mp3.wav.ogg.aif.mo3.it.xm.s3m.mtm.mod.umx."

To ease sync, search the code for:
// 10-09-2019 Bass.dll
« Last Edit: October 09, 2019, 10:51:45 pm by Michael Lobko-Lobanovsky »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: OR audio (Bass.dll)
« Reply #1 on: October 09, 2019, 10:52:45 pm »
Thank you Patrice,

I will study your code tomorrow and will come back with my impressions.
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: OR audio (Bass.dll)
« Reply #2 on: October 10, 2019, 02:05:51 pm »
Patrice,

Your mobj.h contains traces of a "concentric rotation flag", which is evidently implemented as rotate[8]. I don't remember very well what it is (probably it was some latest request of yours that I didn't reimplement in my code). Can you send me your renderers.h, globals.h and any other files that might utilize this feature?
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: OR audio (Bass.dll)
« Reply #3 on: October 10, 2019, 03:05:40 pm »
Here they are.

See Test.zip for an example of use.
« Last Edit: October 10, 2019, 07:38:20 pm by Michael Lobko-Lobanovsky »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: OR audio (Bass.dll)
« Reply #4 on: October 10, 2019, 08:43:05 pm »
I've got your mods to recompile correctly in my project.

Now I'm waiting for a test model to try out the new playaudio feature. :)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: OR audio (Bass.dll)
« Reply #5 on: October 10, 2019, 08:54:55 pm »
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: OR audio (Bass.dll)
« Reply #6 on: October 10, 2019, 09:07:57 pm »
Here is a small collection of free audio samples.

You can drop them all on MBox64, to select those that fit your taste ;)
« Last Edit: October 10, 2019, 09:11:25 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: OR audio (Bass.dll)
« Reply #7 on: October 10, 2019, 09:10:40 pm »
I added the audio #meta to the material file as follows:

Code: [Select]
#wallpaper @background.jpg
#playaudio trongrid.ogg 50 loop
........

and then I put TronGrid.ogg in the Tron model folder, and bass.dll, in the \x64\Release\ folder alongside ObjReader64.exe.

My ObjReader crashes when trying to load the Tron model.

What am I doing wrong?

P.S. And why there is a renderers.zip in the TronGrid archive?
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: OR audio (Bass.dll)
« Reply #8 on: October 10, 2019, 09:17:39 pm »
Also, I have a call to gl_LoadBackgrounds() in my void backToStaticBkgnd() in shaders.h. What bReset flag are you using there?
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: OR audio (Bass.dll)
« Reply #9 on: October 10, 2019, 09:18:12 pm »
The renderer.zip include with the audio was a mistake.

It looks like there is a problem with stream, i shall have to investigate.
(works well with music)
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: OR audio (Bass.dll)
« Reply #10 on: October 10, 2019, 09:24:56 pm »
Please take your time. It all can wait till tomorrow. :)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: OR audio (Bass.dll)
« Reply #11 on: October 10, 2019, 09:25:26 pm »
    case MENU_ANI_BKGND: // MLL 06-01-2019: ani backgrounds
        gP.bAniBkgnd = !gP.bAniBkgnd;
        if (gP.bAniBkgnd) {
            dwStyle = MF_CHECKED;
            resetCurAniShader();
            parseAniShader(L"voronoi.fs"); // default
            if (!gl_LoadAniBackgrounds(GetDlgItem(gP.hMain, IDC_LISTBOX))) {
                CheckMenuItem(gR.hAniMenu, MENU_ANI_BKGND, MF_UNCHECKED);
                EnableMenuItem(gR.hAniMenu, MENU_ANI_BKGND, MF_GRAYED);
                break;
            }
            gP.tCurAniBkgndShader.nShaderID = glsl_LoadShaderFromFile("voronoi.fs");
            rAniStart = GetTickCount64() / 1000.0f;
            StartSync();
        } else {
            dwStyle = MF_UNCHECKED;
            gl_LoadBackgrounds(GetDlgItem(gP.hMain, IDC_LISTBOX), TRUE); // PAT 09-09-2019 use TRUE to restore the current wallpaper rather than "back02.jpg"
            resetCurAniShader();
            //if (!(gP.bGiration | gP.bUseFPS | gP.bAnimateLights | gP.bRotation | gP.bIsLerping))
            //    StopSync(SYNC_OFF);
        }
        CheckMenuItem(gR.hAniMenu, MENU_ANI_BKGND, dwStyle);
        gP.bRedraw = TRUE; // Redraw the OpenGL scene
        break;
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: OR audio (Bass.dll)
« Reply #12 on: October 10, 2019, 09:28:40 pm »
No, I need the call to gl_LoadBackgrounds() in the void backToStaticBkgnd() function in shaders.h!

Do you have such a function at all?
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: OR audio (Bass.dll)
« Reply #13 on: October 10, 2019, 09:39:34 pm »
Indeed #playaudio trongrid.ogg 50 loop
causes an error in Mobj.h there

        case 't': // Tr
            switch (szBuffer[1]) {
            case 'r': // Tr
                if (pMaterial->alpha == 1.0f) { // 12-06-2015 ML: only if alpha is still default
                    fscanf(pFile, "%f", &pMaterial->alpha);
                    if (pMaterial->alpha > 0.0f) {
                        pMaterial->alpha = 1.0f - pMaterial->alpha; // 12-06-2015 ML: follow OBJ specs
                    }
                    if (pMaterial->alpha == 0.0f) { pMaterial->alpha = 1.0f; } // 02-05-2016
                } else {
                    fgets(szBuffer, sizeof(szBuffer), pFile); // 12-06-2015 ML: ignore
                }
                break;


Because of the use of "Tr" go figure !!!


Quote
No, I need the call to gl_LoadBackgrounds() in the void backToStaticBkgnd() function in shaders.h!

void backToStaticBkgnd() { // MLL 06-10-2019:
    BKSHADER* cs = &gP.tCurAniBkgndShader;

    gP.bAniBkgnd = FALSE;
    CheckMenuItem(gR.hAniMenu, MENU_ANI_BKGND, MF_UNCHECKED);
    if (cs->nShaderID) {
        for (int idx = 0; idx <= 3; idx++) {
            if (cs->samplerMapID[idx]) {
                glActiveTexture(GL_TEXTURE0 + idx);
                glBindTexture(GL_TEXTURE_2D, 0);
                glDisable(GL_TEXTURE_2D);
            }
        }
        resetCurAniShader();
        glActiveTexture(GL_TEXTURE0);
        glEnable(GL_TEXTURE_2D);
        glEnable(GL_LIGHT0);
    }
    gl_LoadBackgrounds(GetDlgItem(gP.hMain, IDC_LISTBOX), FALSE);

    gP.bRedraw = TRUE;
    gl_DrawScene();
}

« Last Edit: October 10, 2019, 09:45:29 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: OR audio (Bass.dll)
« Reply #14 on: October 10, 2019, 09:43:17 pm »
Thank you Patrice!

Renaming the OGG file to Grid.ogg...
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)