Home | History | Annotate | Download | only in smoke
      1 /*
      2  INTEL CONFIDENTIAL
      3  Copyright 2009 Intel Corporation All Rights Reserved.
      4  The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its suppliers or licensors. Title to the Material remains with Intel Corporation or its suppliers and licensors. The Material contains trade secrets and proprietary and confidential information of Intel or its suppliers and licensors. The Material is protected by worldwide copyright and trade secret laws and treaty provisions. No part of the Material may be used, copied, reproduced, modified, published, uploaded, posted, transmitted, distributed, or disclosed in any way without Intels prior express written permission.
      5 
      6  No license under any patent, copyright, trade secret or other intellectual property right is granted to or conferred upon you by disclosure or delivery of the Materials, either expressly, by implication, inducement, estoppel or otherwise. Any license under such intellectual property rights must be express and approved by Intel in writing.
      7 */
      8 
      9 #include <stdio.h>
     10 #include "mixaudio.h"
     11 #include "mixparams.h"
     12 #include "mixacp.h"
     13 #include "mixacpmp3.h"
     14 
     15 void test_getversion()
     16 {
     17   g_printf("Calling mixaudio_getversion...\n");
     18   {
     19     guint major = 0;
     20     guint minor = 0;
     21     MIX_RESULT ret = mix_audio_get_version(&major, &minor);
     22     if (MIX_SUCCEEDED(ret))
     23     {
     24       g_printf("MixAudio Version %u.%u\n", major, minor);
     25     }
     26     else
     27       g_printf("mixaudio_getversion() failed! Ret code : 0x%08x\n", ret);
     28   }
     29 }
     30 
     31 int main (int argc, char **argv)
     32 {
     33   g_type_init();
     34 
     35   g_printf("Smoke test for MixAudio and structs\n");
     36 
     37   test_getversion();
     38 
     39   g_printf("Creating MixAudio...\n");
     40   MixAudio *ma = mix_audio_new();
     41   if (MIX_IS_AUDIO(ma))
     42   {
     43     g_printf("Successful.\n");
     44 
     45   }
     46   else
     47   {
     48     g_printf("Failed.\n");
     49   }
     50 
     51   g_printf("Creating MixAudioConfigParams...\n");
     52   MixAudioConfigParams *map = mix_acp_new();
     53   if (MIX_IS_AUDIOCONFIGPARAMS(map))
     54   {
     55     g_printf("Successful.\n");
     56 
     57     g_printf("Destroying MixAudioConfigParams...\n");
     58     mix_acp_unref(map);
     59     g_printf("Successful.\n");
     60   }
     61   else
     62   {
     63     g_printf("Failed.\n");
     64   }
     65   g_printf("Creating mp3 config params...\n");
     66   MixAudioConfigParamsMP3 *mp3 = mix_acp_mp3_new();
     67 
     68   mp3->CRC = 0;
     69 
     70   g_printf("Destroying MixAudio...\n");
     71   mix_audio_unref(ma);
     72   g_printf("Successful.\n");
     73 
     74   g_printf("Smoke completed.\n");
     75 }
     76 
     77 
     78