~ubuntu-branches/ubuntu/karmic/mhwaveedit/karmic

« back to all changes in this revision

Viewing changes to src/chunk.h

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2008-01-08 22:20:37 UTC
  • mfrom: (2.1.6 hardy)
  • Revision ID: james.westby@ubuntu.com-20080108222037-tsazhckl5vmc8yih
Tags: 1.4.14-2
Added desktop file (Closes: #457849), thanks to Marco Rodrigues

Show diffs side-by-side

added added

removed removed

Lines of Context:
266
266
*/
267
267
 
268
268
guint chunk_read_array(ChunkHandle *handle, off_t sampleno, guint size, 
269
 
                       void *buffer, int dither_mode);
 
269
                       void *buffer, int dither_mode, off_t *clipcount);
270
270
 
271
271
 
272
272
 
281
281
*/
282
282
 
283
283
guint chunk_read_array_fp(ChunkHandle *handle, off_t sampleno, guint samples,
284
 
                          sample_t *buffer, int dither_mode);
 
284
                          sample_t *buffer, int dither_mode, off_t *clipcount);
285
285
 
286
286
 
287
287
/* Frees the resources used by a ChunkHandle. All handles should be freed when
347
347
                              int dither_mode, StatusBar *bar);
348
348
 
349
349
 
 
350
 
 
351
 
 
352
/* Creates a new Chunk with a mix of the original chunk's channels.
 
353
 * channels_out determines the number of output channels
 
354
 * map is a (chunk->channels x channels_out)-matrix; 
 
355
 *   If map[src*channels_out + dst], then channel <src> from chunk will be
 
356
 *   copied into channel <dst> of the result. Output channels with no assigned
 
357
 *   inputs will be silent, output channels with more than one assigned input
 
358
 *   will be mixed.
 
359
 */
 
360
Chunk *chunk_remap_channels(Chunk *chunk, int channels_out, gboolean *map, 
 
361
                            int dither_mode, StatusBar *bar);
 
362
 
 
363
 
350
364
/* Creates a new chunk containing a mix of two chunk's data. The chunks must 
351
365
 * have the same format but need not be of the same length. */
352
366
 
353
367
Chunk *chunk_mix(Chunk *c1, Chunk *c2, int dither_mode, StatusBar *bar);
354
368
 
355
369
 
 
370
off_t chunk_zero_crossing_any_forward(
 
371
  Chunk *c, StatusBar *bar, off_t cursorpos);
 
372
off_t chunk_zero_crossing_any_reverse(
 
373
  Chunk *c, StatusBar *bar, off_t cursorpos);
 
374
off_t chunk_zero_crossing_all_forward(
 
375
  Chunk *c, StatusBar *bar, off_t cursorpos);
 
376
off_t chunk_zero_crossing_all_reverse(
 
377
  Chunk *c, StatusBar *bar, off_t cursorpos);
 
378
 
356
379
 
357
380
/* Returns the maximum absolute value of all the samples in the chunk. 
358
381
 * Returns negative value if anything failed. */
387
410
/* Create a new chunk of the same length and format as the input chunk, 
388
411
 * consisting of a linear interpolation between the input chunk's two 
389
412
 * endpoints. Returns NULL on failure. 
 
413
 *
 
414
 * If falldown_mode is TRUE and the chunk is long, the endpoints will
 
415
 *be ramped down to zero and the middle part will be constant zero.
390
416
 */
391
417
 
392
 
Chunk *chunk_interpolate_endpoints(Chunk *chunk, int dither_mode, StatusBar *bar);
 
418
Chunk *chunk_interpolate_endpoints(Chunk *chunk, gboolean falldown_mode,
 
419
                                   int dither_mode, StatusBar *bar);
393
420
 
394
421
 
395
422
 
459
486
 *     the same time, if FALSE one channel at a time will be sent.
460
487
 *   convert - If TRUE the samples will be sent as sample_t (floating point) 
461
488
 *     values, otherwise they will be sent in raw format.
 
489
 *   samplepos - The location within the chunk that parsing should start at.
 
490
 *   reverse - If TRUE, parsing will move backward through the chunk; if FALSE
 
491
 *     parsing will move forward through the chunk.
462
492
 *
463
493
 *   returns - FALSE on success, TRUE if proc returned TRUE or a read error 
464
494
 *     occured.
466
496
 
467
497
gboolean chunk_parse(Chunk *chunk, chunk_parse_proc proc, gboolean allchannels,
468
498
                     gboolean convert, int dither_mode,
469
 
                     StatusBar *bar, gchar *title);
 
499
                     StatusBar *bar, gchar *title, off_t samplepos, gboolean reverse);
470
500
 
471
501
 
472
502
 
489
519
/* Calls func for each existing chunk. */
490
520
void chunk_foreach(GFunc func, gpointer user_data);
491
521
 
492
 
 
 
522
gboolean clipwarn(off_t clipcount, gboolean maycancel);
493
523
 
494
524
 
495
525
#endif