~ubuntu-branches/ubuntu/wily/morse/wily-proposed

« back to all changes in this revision

Viewing changes to morse.d/beepPA.c

  • Committer: Package Import Robot
  • Author(s): Nanakos Chrysostomos
  • Date: 2015-06-10 11:26:20 UTC
  • mfrom: (7.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20150610112620-q00v2tou9427gf42
Tags: 2.5-1
* New upstream release.
* Bump S-V to 3.9.6.
* Clean Lintian messages.
* Fix AlarmSet declaration and definition match (Closes: Bug#749420).
* Update watch file (Closes: Bug#784861).
* Fix build (omit morseALSA and morseLinux) for non-Linux arches
  - drop 02makefile.patch, build and install via debian/rules
* Fix -X crash (Closes: #716099, #716111, #716218, #716298)
* Adjust Maintainer/Uploaders fields

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
 
47
47
static void play_tone()
48
48
{
49
 
    int c;
50
49
    int len = (int)(sample_format.rate*beep_info.time/1000.0);
51
 
    double t, tt;
52
 
    double v;
53
50
    int16_t *sample;
54
 
    int r;
55
51
 
56
52
    sample = malloc(len*sizeof(sample[0]));
57
53
    if (!sample)
59
55
    if (beep_info.volume == 0) {
60
56
        memset(sample, 0, len*sizeof(sample[0]));
61
57
    } else {
 
58
        double t, tt;
 
59
        int c;
 
60
        double v;
62
61
        tt = beep_info.time/1000.0;
63
62
        for (c=0; c<len; c+=2) {
64
63
            t = c/((double)sample_format.rate); /* Time in s from start */