if(!pcm||!pcm_is_ready(pcm)){ fprintf(stderr,"Unable to open PCM device (%s)\n", pcm_get_error(pcm)); return0; } size=pcm_get_buffer_size(pcm); buffer=malloc(size); if(!buffer){ fprintf(stderr,"Unable to allocate %d bytes\n",size); ...
int ahub_device = 0; unsigned int capture_sample(FILE *file, unsigned int card, unsigned int device, unsigned int channels, unsigned int rate, enum pcm_format format, unsigned int period_size, unsigned int period_count); void sigint_handler(int sig) ...
Roy Li提交于7年前.tinycap: Modify capture_sample()for pcm data to frames /* tinycap.c ** ** Copyright 2011, The Android Open Source Project ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ...
fprintf(stderr, "Unable to open PCM device (%s)\n", pcm_get_error(pcm)); return 0; } size = pcm_frames_to_bytes(pcm, pcm_get_buffer_size(pcm)); buffer = malloc(size); if (!buffer) { fprintf(stderr, "Unable to allocate %d bytes\n", size); free(buffer); pcm_close(pcm);...
fprintf(stderr, "Unable to create file '%s'\n", argv[1]); return 1; } Jul 15, 2011 Add tinycap utility to capture PCM riff/wave files Jul 15, 2011 114 115 116 } /* parse command line arguments */ Jun 4, 2020 tinycap: replace manual option parsing with optparse ...
Files master include Android.mk Makefile README mixer.c pcm.c tinycap.c tinymix.c tinypcminfo.c tinyplay.c tinywavinfo.c
fprintf(stderr, "Usage: %s file.wav [-d device] [-c channels] " "[-r rate] [-b bits]\n", argv[0]); return 1; } file = fopen(argv[1], "wb"); if (!file) { fprintf(stderr, "Unable to create file '%s'\n", argv[1]); return 1; } /* parse command line arguments ...
Add tinycap utility to capture PCM riff/wave files 86 87 88 89 90 91 92 93 94 95 96 97 return 1; } file = fopen(argv[1], "wb"); if (!file) { fprintf(stderr, "Unable to create file '%s'\n", argv[1]); return 1; } /* parse command line arguments */ argv += 2; whi...