Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (henrybane), 1,246 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Klopf, klopf... Hiiilllffeee! [Re: jcl] #405128
07/24/12 10:03
07/24/12 10:03
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
media_play hat das Problem soweit ich weiß nicht - vielleicht hilft Dir das weiter.


no science involved
Re: Klopf, klopf... Hiiilllffeee! [Re: fogman] #405153
07/24/12 19:10
07/24/12 19:10
Joined: Mar 2007
Posts: 1,852
A
alpha_strike Offline OP
Serious User
alpha_strike  Offline OP
Serious User
A

Joined: Mar 2007
Posts: 1,852
Wie krieg ich damit nur Balance-Effekte hin? Ich dachte eigentlich, dass wenn ich ein reines Panel-Spiel machen würde, müsste ich nicht mehr mit solchen Problemen kämpfen. Und ich hätte bei Gott nicht gedacht, dass mir die Galle bei solchen uralten Befehlen wie "snd_play" aufsteigt. Es macht einfach keinen Spaß mehr.

Re: Klopf, klopf... Hiiilllffeee! [Re: alpha_strike] #405155
07/24/12 20:37
07/24/12 20:37
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Also mit media_play, gefolgt von media_tune hatte ich keinen Erfolg, um die Balance einzustellen. Aber mit OpenAL geht das ohne Probleme!

Mit dem folgenden Beispiel und einer Datei "monkey.wav" kann man das schnell mal ausprobieren:

Code:
#include <acknex.h>
#include <default.c>
#include <ackoal.h>

ASOUND* sndMonkey;

var g_balance = 0;

void playMonkey (var balance)
{
    asnd_play(sndMonkey, 100, balance);
}

void playMonkey_ev ()
{
    playMonkey(g_balance);
}

int main ()
{
    on_space = playMonkey_ev;
    
    while (1)
    {
        g_balance = clamp(g_balance + key_force.x * time_step, -100, 100);
        draw_text(str_printf(NULL, "balance = %d", (int)g_balance), 10, 10, COLOR_WHITE);
        
        wait(1);
    }
}

void main_startup ()
{
    sndMonkey = snd_createoal("monkey.ogg");
}



Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1