Lines Matching refs:sfinfo
64 SF_INFO sfinfo ;
76 memset (&sfinfo, 0, sizeof (sfinfo)) ;
80 if ((file = sf_open (filename.c_str (), SFM_READ, &sfinfo)) == NULL)
85 if (sfinfo.frames > FOUR_GIG)
86 printf ("This is a really huge file (%lld frames).\nYou may run out of memory trying to load it.\n", (long long) sfinfo.frames) ;
90 dim (0) = sfinfo.frames ;
91 dim (1) = sfinfo.channels ;
96 float buffer [BUFFER_FRAMES * sfinfo.channels] ;
104 if (total + readcount > sfinfo.frames)
105 readcount = sfinfo.frames - total ;
107 for (int ch = 0 ; ch < sfinfo.channels ; ch++)
109 out (total + k, ch) = buffer [k * sfinfo.channels + ch] ;
113 } while (readcount > 0 && total < sfinfo.frames) ;
118 retval.append ((octave_uint32) sfinfo.samplerate) ;
122 string_of_format (fmt, sfinfo.format) ;
140 SF_INFO sfinfo ;
157 memset (&sfinfo, 0, sizeof (sfinfo)) ;
159 sfinfo.format = format_of_str (format) ;
160 if (sfinfo.format == 0)
165 sfinfo.samplerate = lrint (args (2).scalar_value ()) ;
166 if (sfinfo.samplerate < 1)
167 { error ("Bad sample rate : %d.\n", sfinfo.samplerate) ;
181 sfinfo.channels = cols ;
183 if ((file = sf_open (filename.c_str (), SFM_WRITE, &sfinfo)) == NULL)
188 float buffer [BUFFER_FRAMES * sfinfo.channels] ;
200 for (int ch = 0 ; ch < sfinfo.channels ; ch++)
202 buffer [k * sfinfo.channels + ch] = data (total + k, ch) ;