File: mac_port_changes.txt

package info (click to toggle)
nyquist 3.24%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 58,156 kB
  • sloc: ansic: 74,757; lisp: 18,169; java: 10,942; cpp: 6,688; sh: 175; xml: 58; makefile: 40; python: 15
file content (107 lines) | stat: -rw-r--r-- 2,167 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
Changes to Nyquist:

In audiomac.c:

(Do byteswap:)

    long samples = srclength / 2;
    short *srcs = (short *)src;
    short *dsts = (short *)dst;
    long i;
      
    for(i=0; i<samples; i++) {
      //dsts[i] = srcs[i];
      
      // For Nyquist only, do byte-swap...
      dsts[i] = (short)(((((unsigned short)srcs[i]) & 0xFF) << 8) + ((((unsigned short)srcs[i]) & 0xFF00) >> 8));
    }

In sndwrite.c (sound_save_sound and sound_save_array both):

    cvtfn = find_cvt_to_fn(snd, buf);
    
>   #ifdef macintosh
>   if (player) {
>     gprintf(TRANS, "Playing audio: Click and hold mouse button to stop playback.\n");
>   }
>   #endif

    while (n > 0) {
	long togo;
	float peak;
	sample_block_type sampblock = sound_get_next(s, &blocklen);
#ifdef SNAPSHOTS
	printf(".");
	if (sound_created_flag) {
	    printf("SNAPSHOT: ");
	    sound_print_tree(printing_this_sound);
	    sound_created_flag = false;
	}
	fflush(stdout);
#endif
	if (sampblock == zero_block || blocklen == 0) {
	    break;
	}
	togo = min(blocklen, n);

	buflen = (*cvtfn)((void *) buf, (void *) sampblock->samples,
			  togo, s->scale, &peak);
	if (peak > max_sample) max_sample = peak;
	
>   #ifdef macintosh
>   if (Button()) {
>     if (player) {
>       snd_reset(player);
>     }
>     gprintf(TRANS, "\n\nStopping playback...\n\n\n");
>     break;
>   }
>   #endif

In cext.h:

+   #ifdef round
+   #undef round
+   #endif

In fft.c:

  /* perform the fft: */
  fftnf(1, (const int *)&len, temp_fft, temp_fft + len, 1, -1.0);
           ^^^^^^^^^^^^^

In userio.h:

    #ifdef MACINTOSH
+   #undef false
+   #undef true
+   #include <MacTypes.h>
    #define TRANS    (long)    0
    #define ERROR    (long)    1
    #define FATAL    (long)    2
    #define GDEBUG   (long)    3
    #endif

In tran/ifft.c:
    
        #ifndef macintosh
        #include "crtdbg.h"
        #endif
    
        #ifndef macintosh
		_CrtSetDbgFlag(_CRTDBG_CHECK_ALWAYS_DF);
		#endif    

In userio.c:

        strcpy((char *)Pstr, str);
*   	C2PStr((char *)Pstr);
    	strcpy((char *)Pfn, fn);
*   	C2PStr((char *)Pfn);
    
Get from Audacity:
    snd.c
    sndconfig.h
    sndheader.c
    sndio.c