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 - Paul Smith

#46
Tried PLAYMUSIC  on windows 10 x64 on version 14.101 and 14.371, both works Fine, Unable to test under wine Translation.
#47
I think an auto-update on the IDE needs auto enabling.. I mentioned that this was fixed on the 16th of last month.People missing or not reading the whole post.
#48
The VSYNC has not really been a problem for me with AMD graphics card HD3200 in my laptop and a R7 250x in my desktop, but as my laptop is getting old I upgraded to a Faster Tablet/laptop thing a few months ago. this is when the problem started, Its has Intel HD which is not the Best, Screen Junk at the start of every video Played then Perfect, But GLB is just tearing.However I found if i choose VSYNC by driver not application in the INTEL HD settings then its Gone.

#49
looks like this has just been fixed in the v14 update.Just read that you use v12.

change log
14.329
   // Win32:
   //    KEY(cursor) was not always correct.
   // New command:
   //    BUSY - skip the next few HIBERNATE calls
   // libPNG:
   //    updated to version 1.4.19 (security issues)
#50
No Problem  =D

Totally  agree with the update, Even the webpage needs updating.
#51
This was fixed in v14.003 if it is that. Also if you have zoomed the screen in windows I found it does not increase the text size but stretch the screen to your resolutions causing weird and missing screen surface.make sure it's at 100%.
I have a 1920x1080 laptop
The text was small so I changed it to 125% in desktop properties and written a test program. Tried it on my other PC and everything was wrong.
#52
Make sure you have the latest version of glbasic. I had this after I reinstalled the other week. Found out the web page version is not the newest. Do and update from the GUI.
#53
Panda detected this as a Virus,turned it off and it runs.
Not sure how to play
#54
Sorted this about a week ago, took me a bit to understand the C++ syntax but here goes if anyone needs it.

Code (glbasic) Select
DECLARE_ALIAS(FMUSIC_GetTime, "fmod.dll", "_FMUSIC_GetTime@4", (void* pMod), int);

FUNCTION Gettime: modtime
INLINE
return FMUSIC_GetTime(g_pFMod);
ENDINLINE
ENDFUNCTION


Use

Code (glbasic) Select
result= Gettime(modtime)

#55
Right

Code (glbasic) Select
DECLARE_ALIAS(FMUSIC_GetTime, "fmod.dll", "_FMUSIC_GetTime@4", (void* pMod), int);

this code compiles with no error.
how do you  pass the result to a usable variable?
tried to make a function using variations of the samples but error after error.

probably simple  but my brain is leaking.

#56
I'm using the fmod library setup from the samples folder in my project.
I need FMUSIC_Get_Time function adding.
tried to add it myself  but C++ is way above my level. How do you know if its @0 @4,void or char etc.
any help would be great.

added the function docs and fmod code below.

Cheers


Code (glbasic) Select

INLINE
DECLARE_ALIAS(FMUSIC_LoadSong, "fmod.dll", "_FMUSIC_LoadSong@4", (const char* name), void*);
DECLARE_ALIAS(FMUSIC_PlaySong, "fmod.dll", "_FMUSIC_PlaySong@4", (void* pMod), char);
DECLARE_ALIAS(FMUSIC_FreeSong, "fmod.dll", "_FMUSIC_FreeSong@4", (void* pMod), char);
DECLARE_ALIAS(FSOUND_Init, "fmod.dll", "_FSOUND_Init@12", (int, int, unsigned int), char);
DECLARE_ALIAS(FSOUND_Close, "fmod.dll", "_FSOUND_Close@0", (void), void);
DECLARE_ALIAS(FMUSIC_IsFinished, "fmod.dll", "_FMUSIC_IsFinished@4", (void* pMod), char);
DECLARE_ALIAS(FMUSIC_SetMasterVolume, "fmod.dll", "_FMUSIC_SetMasterVolume@8", (void*, int), char);
// DECLARE_ALIAS(FMUSIC_GetTime, "fmod.dll", "_FMUSIC_GetTime@4",

void* g_pFMod = 0;

// need this for ESC-exits
struct FMOD_killer {~FMOD_killer() {if (g_pFMod) FMod_Stop();} } g_Fmod_killa;
ENDINLINE


GLOBAL fmod_init

FUNCTION FMod_Load: fname$
LOCAL good
IF fmod_init = FALSE
fmod_init=TRUE
ENDIF

FMod_Stop()
INLINE

if(FSOUND_Init) FSOUND_Init(65535,64,0);
if(FMUSIC_LoadSong)
g_pFMod = FMUSIC_LoadSong(fname_Str.c_str());
if(g_pFMod) good = TRUE;

ENDINLINE
RETURN good
ENDFUNCTION


FUNCTION FMod_Play:
INLINE

if(FMUSIC_PlaySong && g_pFMod)
FMUSIC_PlaySong(g_pFMod);

ENDINLINE
ENDFUNCTION


FUNCTION FMod_Stop:
INLINE

if(FMUSIC_FreeSong && g_pFMod)
FMUSIC_FreeSong(g_pFMod);
g_pFMod = 0;
if(FSOUND_Close)
FSOUND_Close();
fmod_init=FALSE;
ENDINLINE
ENDFUNCTION



FUNCTION FMod_IsFinished:
INLINE
char ok=1;
if(FMUSIC_IsFinished && g_pFMod)
ok = FMUSIC_IsFinished(g_pFMod);
return ok ? TRUE : FALSE;
ENDINLINE

RETURN TRUE
ENDFUNCTION


FUNCTION FMod_SetMasterVolume: vol
INLINE
if(FMUSIC_SetMasterVolume && g_pFMod)
{
return FMUSIC_SetMasterVolume(g_pFMod, (int)(vol * 256.0)) ? TRUE:FALSE;
}
ENDINLINE
RETURN FALSE
ENDFUNCTION




FMUSIC_GetTime
Returns the time in milliseconds since the song was started. This is useful for
synchronizing purposes becuase it will be exactly the same every time, and it is
reliably retriggered upon starting the song. Trying to synchronize using other
windows timers can lead to varying results, and inexact performance. This fixes that
problem by actually using the number of samples sent to the soundcard as a reference.

int F_API FMUSIC_GetTime(
FMUSIC_MODULE *mod
);

Parameters
mod Pointer to the song to get time from.

Return Value
On success, the time played in milliseconds is returned.
On failure, -1 is returned.

Remarks
#57
Good fun,

Wish I has time to program games.I just do Reset and Configuration apps for Intruder Alarms(android) or convert
old demos/effect to PCs.

space bar tile shakes the screen with no real effect yet, was hoping  k would blow up all the men not reset to zero.


#58
I tried to modify my fake plasma code to run an AVI to play,grab, resize then draw onto the spinning cube ( GLBASIC v14.106 is not working for this anymore.the exe in the folder run OK but when compiledagain  behave different.Any Ideas? )


If I get it to work i'll upload it.
Just Remembered I did this with DarkBasic not GLB, just found the source code.It can't be done with GLB playmovie or loopmovie as it will pause your program to run the Movie file.


http://www.glbasic.com/forum/index.php?topic=10074.0
#59
I think the Homepage needs a revamp, I bet with a better look we can tempt more people to GLBasic.

I bet most of the GLBasic community are willing to chip in with web design or even invest money to keep thing present,I know I would. :)

#60
cheers , I was messing with insert image icon as well. I guess that for web stored Images.

Sent from my M470BSE using Tapatalk