/* * avsystem * * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. * * Contact: Jonghyuk Choi * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include #include "../include/avsys-audio.h" #include "../include/avsys-audio-logical-volume.h" #define VERSION_NUM 0001 void usage(char *name) { printf("Usage: %s [FILE]...\n\n", name); printf("Version %04d\n", VERSION_NUM); printf("\n"); return; } int main(int argc, char* argv[]) { int i = 0; int j = 0; int k = 0; int err = 0; char filepath[256]={0,}; FILE *fp = NULL; if(argc > 2) { usage(argv[0]); return 0; } else if(argc == 2) { strncpy(filepath, argv[1], sizeof(filepath)-1); } else if(argc == 1) { strncpy(filepath, AVSYS_VOLUME_INI_TEMP_PATH, sizeof(filepath)-1); fprintf(stderr,"Use default file path %s\n", filepath); } fp = fopen(filepath, "w"); if(!fp) { fprintf(stderr,"Can not open file %s\n",filepath); return -1; } for(i=AVSYS_AUDIO_LVOL_GAIN_TYPE_0; i