English
Forum

Eingangspegel graphical present?

 
- Page 1 -


Grüß you!

with one recent Spieleprojekt set itself me The question, whether the Audioeingangspegel (or. The Veränderung desselben) one Mikrofons in XProfan in anybody shape graphical present let can. I coming on this thoughts, there itself accordingly ggf. Opportunities for "lautstärkegesteuerte" Spielsteuerungen yield would (given Yes time to many Monden a Pong-Variante with vergleichbarer operating).

Vielen Thanks already time in the Vorraus

MfG, serious.
 
08/25/11  
 



 
- Page 1 -


Coole question, know so did i gladly How the goes and I moreover yet nothing parat.

one should hold well Audiodaten in a memory exist having circa from whom therein encompassed data against a Volume To calculate.

Perhaps. can I here fasten:  [...] 
 
08/25/11  
 



Soso...  [...]  ... mist must in that bed tomorrow morning out...

MSDN
The common order for calling Waveform Audio functions to record audio is:

waveInOpen
waveInPrepareHeader
waveInAddBuffer
waveInStart
waveInUnprepareHeader
waveInClose


- so ought to one well vorgehen -

the ought to itself well erarbeiten let.
 
08/25/11  
 



strain woken up weils simply "zu" warm is and thought so "gugste mal"... -

same but again ex into Heia...

Pegel Show is simply... meinste something like?

Download
external Download



 
08/26/11  
 



Kamma too simply ne Oszillatoranzeige building:

Download
external Download





436 kB
Hochgeladen:08/26/11
Downloadcounter14
Download
17 kB
Hochgeladen:08/26/11
Downloadcounter0
Download
14 kB
Hochgeladen:08/26/11
Downloadcounter0
Download
 
08/26/11  
 



Vielen Thanks - the sees still very interestingly from will be me the whole now time To Gemüte lead.
 
08/27/11  
 



perfect - very this is it! Vielen Thanks! I frag simply time - would have You vllt. a Codeschnipsel o.Ä. there?
 
08/27/11  
 



self-evident should You so much Source moreover get How You like -

would I only gladly know in which Variante You whom gladly would have

I moreover thoroughly gladly some Lösungsansätze offer would.

correctly. optimal and on the simplest GEHTS if you XProfan in link with XPSE  [...]  einsetzt -

there could I you fix a Variante "herbilden" so the eigentliche Hauptprogramm garnichts do must and simply z.B. in a Variable always the actually Pegelwert standing.

then were it there another pure XProfan-Variante The but not so reliably his and is where You in the program hold self constantly whom Pegelwert herausmessen must what gewisse Verarbeitungszeit in claim takes and even more or less "ständig" happen must there You Yes not the value of the day before yesterday know want.

More work would there make ne DLL as well as too a Unit or Include a DLL imply and but too went one Module as Unit which The functions as MemoryModule vorhalten could.

here a minimale "Quick&Dirty"-Variante in "reinem" XProfan:
'{$cleq}
'{$runtime c:\dev\x11}
'{$compiler c:\dev\x11}
struct waveFormatEx=wFormatTag%,nChannels%,nSamplesperSec&,nAvgBytesPerSec&,nBlockAlign%,wBitsPerSample%,cbSize%
declare waveform#
var WaveHdrIn&=0
cls
usermessages 960
dim waveform#,waveFormatEx

with waveform#

    .wFormatTag%=1
    .nChannels%=1
    .wBitsPerSample%=8
    .nAvgBytesPerSec&=16000*1*8
    .nSamplesPerSec&=16000
    .nBlockAlign%=1
    .cbSize%=0

endwith

var hWaveIn&=external("kernel32","GlobalAlloc",64,4)
case external("winmm","waveInOpen",hWaveIn&,-1,waveform#,%hWnd,0,65536) : end messagebox("ERROR","ERROR",4096)
hWaveIn&=long(hWaveIn&,0)

whileLoop 2

    WaveHdrIn&=createWaveHdrIn()
    external("winmm","waveInPrepareHeader",hWaveIn&,WaveHdrIn&,32)
    external("winmm","waveInAddBuffer",hWaveIn&,WaveHdrIn&,32)

wend

external("winmm","waveInStart",hWaveIn&)
var peek!=0
var tmp&=0

while 1

    waitinput

    select %uMessage

        caseof 960

        if &uwParam=hWaveIn&

            WaveHdrIn&=createWaveHdrIn()
            external("winmm","waveInPrepareHeader",hWaveIn&,WaveHdrIn&,32)
            external("winmm","waveInAddBuffer",hWaveIn&,WaveHdrIn&,32)
            tmp&=abs(128-byte(long(&ulParam,0),0))*2
            peek!=peek!*0.95
            case peek!<tmp& : peek!=tmp&
            usebrush 1,$FFFFFF
            rectangle 0,0 - 40,256-peek!
            usebrush 1,$FF
            rectangle 0,(256-peek!) - 40,256
            external("kernel32","GlobalFree",long(&ulParam,0))
            external("kernel32","GlobalFree",&ulParam)

        endif

    endSelect

wend

end

proc createWaveHdrIn

    var waveHdrIn&=external("kernel32","GlobalAlloc",64,32)
    long waveHdrIn&,0=external("kernel32","GlobalAlloc",64,64),64
    return waveHdrIn&

endproc


Download
external Download




PS: Why write as Guest instead of announced? (  [...]  ) -

so get still no Info if you of/ one what writes.

300 kB
Hochgeladen:08/27/11
Downloadcounter193
Download
5 kB
Hochgeladen:08/27/11
Downloadcounter197
Download
 
08/27/11  
 



Yes super - many Thanks, runs! Yes means wenn's nothing ausmacht, would I over a Version with XPSE very forward

and Yes, is correct, really could I too register. Mach I time ex the next response. having so to längerer Time somehow Problems and be therefore from habit hautsächlich only yet as Guest present
 
08/27/11  
 



If somehow one Anmeldeproblem yet consist ought to then can You, the z.B. here under Contact simply write:  [...] 

I faith it was something irritierend that I of Login by Membername To Login by E-Mail übergegangen be simply because it safer is because the Mitgliedsnamen public are in the Contrast to the E-Mail-Adressen what about me secure/ real Accounts anbeiten wants to therefore SSL-ensured are.

so a Variante with XPSE place I you since and poste The then here.
 
08/27/11  
 



look time whether You with the miclevel.inc clear come:  [...] 
 
08/28/11  
 




Endwhile
so, now as registrierter User
means, perfect - many Thanks! this is quite very the, I me vorstellte. will be me the time accurate standing and with ask ggf. once more what write.
 
08/29/11  
 



 
- Page 2 -


gladly happen!
 
08/29/11  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

14.414 Views

Untitledvor 0 min.
H.Brill05/04/23
Sven Bader07/20/21
Andre Rohland05/02/19
Selmo02/25/19
More...

Themeninformationen

this Topic has 3 subscriber:

iF (8x)
unbekannt (4x)
Endwhile (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie