~ubuntu-branches/ubuntu/oneiric/muse/oneiric

« back to all changes in this revision

Viewing changes to muse/mtc.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Fabrice Coutadeur
  • Date: 2010-11-17 21:43:38 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20101117214338-1hvfl7oo2dsqnvrb
Tags: 1.1-0ubuntu1
* New upstream release (LP: #668631)
* Switch to dpkg-source 3.0 (quilt) format
* Switch to dh7 short form
* debian/rules:
  - added --enable-dssi and --enable-osc to conf flags for dssi support
  - added -ljackserver to LDFLAGS to fix a FTBFS because of --as-needed
* debian/control:
  - added build build dependency on liblo-dev and dssi-dev for dssi support
  - bump Standards-version to 3.9.1. No changes required.
* debian/muse.desktop, debian/muse.xpm: dropped as desktop file and icon is
  now shipped upstream.
* fix-desktop-categories.patch: fix Categories tag in upstream desktop file
* 10_es_locale_fix.dpatch: refreshed and converted to quilt as
  fix_es_locale.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
//    global mtcType
18
18
//---------------------------------------------------------
19
19
 
20
 
double MTC::time() const
 
20
double MTC::time(int type) const
21
21
      {
22
22
      double time = _h * 3600 + _m * 60 + _s;
23
23
      double ft = 0.0;
24
 
      switch (mtcType) {
 
24
      if(type == -1)
 
25
        type = mtcType;
 
26
      switch (type) {
25
27
            case 0:     // 24 frames sec
26
28
                  ft = 1.0/24.0;
27
29
                  break;
30
32
                  break;
31
33
            case 2:     // 30 drop frame        TODO
32
34
            case 3:     // 30 non drop frame
 
35
            default:
33
36
                  ft = 1.0/30.0;
34
37
                  break;
35
38
            }
40
43
//   MTC
41
44
//---------------------------------------------------------
42
45
 
43
 
MTC::MTC(double t)
 
46
MTC::MTC(double t, int type)
44
47
      {
45
48
      _h  = int(t/3600);
46
49
      t -= _h * 3600;
49
52
      _s  = int(t);
50
53
      t -= _s;
51
54
      double ft = 1.0/24.0;
52
 
      switch (mtcType) {
 
55
      if(type == -1)
 
56
        type = mtcType;
 
57
      switch (type) {
53
58
            case 0:     // 24 frames sec
54
59
                  ft = 1.0/24.0;
55
60
                  break;
58
63
                  break;
59
64
            case 2:     // 30 drop frame
60
65
            case 3:     // 30 non drop frame
 
66
            default:
61
67
                  ft = 1.0/30.0;
62
68
                  break;
63
69
            }
72
78
//    increment MTC time one quarter frame time
73
79
//---------------------------------------------------------
74
80
 
75
 
void MTC::incQuarter()
 
81
void MTC::incQuarter(int type)
76
82
      {
77
83
      int frames = 24;
78
 
      switch (mtcType) {
 
84
      if(type == -1)
 
85
        type = mtcType;
 
86
      switch (type) {
79
87
            case 0:
80
88
                  frames = 24;
81
89
                  break;
84
92
                  break;
85
93
            case 2:
86
94
            case 3:
 
95
            default:
87
96
                  frames = 30;
88
97
                  break;
89
98
            }