dernier commit avant le Gers
This commit is contained in:
1
Modules/.gitignore
vendored
1
Modules/.gitignore
vendored
@@ -2,6 +2,7 @@
|
||||
chkpixels
|
||||
twavm
|
||||
trnd
|
||||
t_centermag
|
||||
|
||||
datas/
|
||||
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
module centermag
|
||||
implicit none
|
||||
!-----------------------------------------------------------------------
|
||||
!-
|
||||
! By definition, the default centermax (0, 0, 1) give us a
|
||||
! (-1,-1), (1, 1) box, who is mapped to the screen size.
|
||||
!-
|
||||
!-----------------------------------------------------------------------
|
||||
! definition of structures
|
||||
!-
|
||||
type t_centermag
|
||||
@@ -13,16 +18,30 @@ type t_centermag
|
||||
end type
|
||||
!-------------------------------------------------------------------
|
||||
contains
|
||||
!-------------------------------------------------------------------
|
||||
subroutine init_centermag(cntmag, w, h, mag)
|
||||
type(t_centermag),intent(out) :: cntmag
|
||||
integer, intent(in) :: w, h ! screen size
|
||||
real, intent(in) :: mag
|
||||
|
||||
write(0, *) ">>> init centermag:", w, h
|
||||
|
||||
cntmag%wscr = w ; cntmag%hscr = h
|
||||
cntmag%mag = mag
|
||||
|
||||
end subroutine
|
||||
|
||||
!-------------------------------------------------------------------
|
||||
subroutine print_centermag (cm)
|
||||
type(t_centermag), intent(in) :: cm
|
||||
|
||||
print *, "Screen ", cm%wscr, cm%hscr
|
||||
print *, "MagFactor ", cm%mag
|
||||
print *, "Center ", cm%cx, cm%cy
|
||||
! print *, "Center ", cm%cx, cm%cy
|
||||
|
||||
end subroutine
|
||||
!-------------------------------------------------------------------
|
||||
!-------------------------------------------------------------------
|
||||
subroutine centermag_scr2real (sx, sy, rx, ry)
|
||||
integer, intent(in) :: sx, sy
|
||||
real, intent(out) :: rx, ry
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
program t
|
||||
|
||||
use centermag
|
||||
implicit none
|
||||
|
||||
type(t_centermag) :: cmag
|
||||
|
||||
print *, '====== programme de test ======'
|
||||
|
||||
cmag%wscr = 800
|
||||
cmag%hscr = 600
|
||||
|
||||
print *, '====== programme de test centermag ======'
|
||||
call essai_centermag(cmag)
|
||||
print *
|
||||
|
||||
@@ -19,15 +13,13 @@ program t
|
||||
contains
|
||||
! --------------
|
||||
subroutine essai_centermag(cm)
|
||||
type(t_centermag), intent(in) :: cm
|
||||
|
||||
real :: rx, ry
|
||||
type(t_centermag), intent(inout) :: cm
|
||||
real :: rx, ry
|
||||
|
||||
call init_centermag(cm, 800, 600, 1.0)
|
||||
call print_centermag (cm)
|
||||
print *
|
||||
|
||||
call centermag_scr2real(1, 1, rx, ry)
|
||||
print *, 'to real :', rx, ry
|
||||
rx = 0.45 ; ry = -1.098
|
||||
|
||||
end subroutine
|
||||
! --------------
|
||||
|
||||
@@ -4,7 +4,7 @@ WAVE="datas/wave.wav"
|
||||
|
||||
# sndfile-info ${WAVE}
|
||||
|
||||
echo ; echo ; echo
|
||||
echo
|
||||
|
||||
wav2text ${WAVE} | ./twavm
|
||||
|
||||
|
||||
Reference in New Issue
Block a user