code
stringlengths
1
1.05M
repo_name
stringlengths
6
83
path
stringlengths
3
242
language
stringclasses
222 values
license
stringclasses
20 values
size
int64
1
1.05M
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpo...
YifuLiu/AliOS-Things
components/SDL2/test/testdrawchessboard.c
C
apache-2.0
3,761
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testdropfile.c
C
apache-2.0
2,924
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testerror.c
C
apache-2.0
1,967
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testfile.c
C
apache-2.0
9,473
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testfilesystem.c
C
apache-2.0
1,772
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testgamecontroller.c
C
apache-2.0
11,999
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testgesture.c
C
apache-2.0
8,458
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testgl2.c
C
apache-2.0
12,691
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testgles.c
C
apache-2.0
10,867
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testgles2.c
C
apache-2.0
20,569
/* Copyright (c) 2008, Edgar Simo Serra All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the follo...
YifuLiu/AliOS-Things
components/SDL2/test/testhaptic.c
C
apache-2.0
13,827
#include <stdio.h> #include "SDL.h" /* !!! FIXME: rewrite this to be wired in to test framework. */ #define RESIZE_BORDER 20 const SDL_Rect drag_areas[] = { { 20, 20, 100, 100 }, { 200, 70, 100, 100 }, { 400, 90, 100, 100 } }; static const SDL_Rect *areas = drag_areas; static int numareas = SDL_arraysiz...
YifuLiu/AliOS-Things
components/SDL2/test/testhittesting.c
C
apache-2.0
4,082
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testhotplug.c
C
apache-2.0
5,564
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testiconv.c
C
apache-2.0
2,278
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testime.c
C
apache-2.0
24,655
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testintersections.c
C
apache-2.0
10,118
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testjoystick.c
C
apache-2.0
10,066
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testkeys.c
C
apache-2.0
1,124
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testloadso.c
C
apache-2.0
2,295
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testlocale.c
C
apache-2.0
1,977
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testlock.c
C
apache-2.0
3,433
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testmessage.c
C
apache-2.0
5,914
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testmultiaudio.c
C
apache-2.0
5,516
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testnative.c
C
apache-2.0
6,979
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testnative.h
C
apache-2.0
1,357
#include "testnative.h" #ifdef TEST_NATIVE_COCOA #include <Cocoa/Cocoa.h> static void *CreateWindowCocoa(int w, int h); static void DestroyWindowCocoa(void *window); NativeWindowFactory CocoaWindowFactory = { "cocoa", CreateWindowCocoa, DestroyWindowCocoa }; static void *CreateWindowCocoa(int w, int h...
YifuLiu/AliOS-Things
components/SDL2/test/testnativecocoa.m
Objective-C
apache-2.0
1,159
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testnativew32.c
C
apache-2.0
2,073
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testnativex11.c
C
apache-2.0
1,158
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testoffscreen.c
C
apache-2.0
4,277
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testoverlay2.c
C
apache-2.0
12,936
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testplatform.c
C
apache-2.0
22,149
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testpower.c
C
apache-2.0
1,953
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testqsort.c
C
apache-2.0
2,883
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testrelative.c
C
apache-2.0
3,285
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testrendercopyex.c
C
apache-2.0
6,132
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testrendertarget.c
C
apache-2.0
9,757
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testresample.c
C
apache-2.0
3,818
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testrumble.c
C
apache-2.0
5,632
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testscale.c
C
apache-2.0
5,672
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testsem.c
C
apache-2.0
3,357
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testsensor.c
C
apache-2.0
3,423
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testshader.c
C
apache-2.0
15,780
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testshape.c
C
apache-2.0
7,095
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testsprite2.c
C
apache-2.0
13,416
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testspriteminimal.c
C
apache-2.0
5,098
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/teststreaming.c
C
apache-2.0
6,357
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testthread.c
C
apache-2.0
3,534
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testtimer.c
C
apache-2.0
3,424
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testver.c
C
apache-2.0
1,351
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testviewport.c
C
apache-2.0
7,997
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testvulkan.c
C
apache-2.0
44,617
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testwm2.c
C
apache-2.0
4,677
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testyuv.c
C
apache-2.0
18,775
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testyuv_cvt.c
C
apache-2.0
8,503
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/testyuv_cvt.h
C
apache-2.0
695
/* Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, ...
YifuLiu/AliOS-Things
components/SDL2/test/torturethread.c
C
apache-2.0
2,859
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #if AOS_COMP_CLI #include "aos/cli.h" #endif extern int audio_install_codec_driver(); extern void sound_example_wav_entry(int argc, char **argv); extern void sound_example_loopback_entry(int argc, char **argv); void sound_example_setvol_entry(int argc, c...
YifuLiu/AliOS-Things
components/a2sa/example/sound_example.c
C
apache-2.0
1,890
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #ifdef HAAS_AUDIO_DEMO #include <posix/pthread.h> #else #include <pthread.h> #endif #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include "sound_pcm.h" #include "audio_drv.h" #include "ulog/ulog.h" #define LOG_TAG "[soun...
YifuLiu/AliOS-Things
components/a2sa/example/sound_example_lb.c
C
apache-2.0
4,889
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include "sound_pcm.h" #include "sound_mixer.h" #include "ulog/ulog.h" #define LOG_TAG "[sound_example_vol]" void sound_example_setvol_entry(int argc, char **argv) { int ...
YifuLiu/AliOS-Things
components/a2sa/example/sound_example_vol.c
C
apache-2.0
722
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #ifdef HAAS_AUDIO_DEMO #include <posix/pthread.h> #else #include <pthread.h> #endif #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include "sound_pcm.h" #include "sound_mixer.h" #include "audio_drv.h" #include "ulog/ulog.h"...
YifuLiu/AliOS-Things
components/a2sa/example/sound_example_wav.c
C
apache-2.0
6,378
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef SOUND_CONTROL_H #define SOUND_CONTROL_H #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <stdarg.h> #include <string.h> #include <errno.h> #include <unistd.h> #include <aos/list.h> #include <aos/kernel.h> #ifndef HAAS_AUDIO_DEMO...
YifuLiu/AliOS-Things
components/a2sa/include/sound_mixer.h
C
apache-2.0
3,771
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef SOUND_PCM_H #define SOUND_PCM_H #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <stdarg.h> #include <string.h> #include <errno.h> #include <unistd.h> #include <aos/list.h> #include <aos/kernel.h> #ifndef HAAS_AUDIO_DEMO #includ...
YifuLiu/AliOS-Things
components/a2sa/include/sound_pcm.h
C
apache-2.0
14,675
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef AUDIO_CARD_H #define AUDIO_CARD_H #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <aos/list.h> #include "control_dev.h" #include "pcm_dev.h" #ifdef __cplusplus extern "C" { #endif typedef struct { int id; struct dlist_s p...
YifuLiu/AliOS-Things
components/a2sa/internal/driver/core/audio_card.h
C
apache-2.0
857
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef AUDIO_H #define AUDIO_H #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <aos/vfs.h> #include <aos/list.h> #include <aos/kernel.h> #include "control.h" #ifdef __cplusplus extern "C" { #endif #define _IOC_NONE 0U ...
YifuLiu/AliOS-Things
components/a2sa/internal/driver/core/audio_drv.h
C
apache-2.0
4,859
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef CONTROL_H #define CONTROL_H #include <stdio.h> #include <aos/list.h> #include "control_dev.h" #ifdef __cplusplus extern "C" { #endif struct audio_kcontrol; struct audio_mixer_control; #define AOS_CTL_ELEM_TYPE_NONE (1 << 0) /* invalid ...
YifuLiu/AliOS-Things
components/a2sa/internal/driver/core/control.h
C
apache-2.0
6,941
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef CONTROL_DEV_H #define CONTROL_DEV_H #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <aos/list.h> #ifdef __cplusplus extern "C" { #endif typedef struct { int id; char name[32]; struct dlist_s kcontrol_list; /* aud...
YifuLiu/AliOS-Things
components/a2sa/internal/driver/core/control_dev.h
C
apache-2.0
590
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef PCM_DEV_H #define PCM_DEV_H #include <stdio.h> #include <aos/list.h> #include "audio_drv.h" #ifdef __cplusplus extern "C" { #endif typedef struct { int (*open)(void *dev); int (*hw_params)(void *dev, audio_hw_params_t *params); int ...
YifuLiu/AliOS-Things
components/a2sa/internal/driver/core/pcm_dev.h
C
apache-2.0
1,293
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef AUDIO_RTOS_H #define AUDIO_RTOS_H #include <stdio.h> #include <stdbool.h> #include "audio_drv.h" #ifdef __cplusplus extern "C" { #endif typedef void* pcm_stream_handler_t; typedef enum { PCM_STREAM_IN = 0, PCM_STREAM_OUT = 1, } pcm_str...
YifuLiu/AliOS-Things
components/a2sa/internal/driver/platform/rtos/audio_rtos.h
C
apache-2.0
2,162
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef CAP_TASK_H #define CAP_TASK_H #include <stdio.h> #include <stdbool.h> #include "audio_drv.h" #ifdef __cplusplus extern "C" { #endif void capture_task_start(void *dev); void capture_task_stop(); int capture_read_data(void *dev, char *buf, unsign...
YifuLiu/AliOS-Things
components/a2sa/internal/driver/platform/rtos/cap_task.h
C
apache-2.0
400
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef PB_TASK_H #define PB_TASK_H #include <stdio.h> #include <stdbool.h> #include "audio_drv.h" #ifdef __cplusplus extern "C" { #endif void playback_task_start(); void playback_task_stop(); int playback_push_data(void *dev, const char *buf, unsigned...
YifuLiu/AliOS-Things
components/a2sa/internal/driver/platform/rtos/pb_task.h
C
apache-2.0
425
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #include <stdio.h> #include <errno.h> #include <string.h> #include <aos/kernel.h> #include <aos/vfs.h> #include <ulog/ulog.h> #include "audio_drv.h" #include "pcm_dev.h" #include "control.h" #include "control_dev.h" #define LOG_TAG "[audio]" #define ...
YifuLiu/AliOS-Things
components/a2sa/src/driver/core/audio.c
C
apache-2.0
12,236
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #include <ulog/ulog.h> #include <errno.h> #include "audio_card.h" #include "audio_drv.h" #define LOG_TAG "[audio_card]" static int audio_card_bitmap = 0; static int audio_card_get_available_id() { int map = 0, id = 0; map = audio_card_bitmap; ...
YifuLiu/AliOS-Things
components/a2sa/src/driver/core/audio_card.c
C
apache-2.0
4,006
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #include <stdio.h> #include <stdlib.h> #include <ulog/ulog.h> #include <errno.h> #include <string.h> #include "control.h" #define LOG_TAG "[control]" #define MAX_CONTROL_COUNT 1028 static int audio_ctl_new(struct audio_kcontrol **kctl, unsigned int coun...
YifuLiu/AliOS-Things
components/a2sa/src/driver/core/control.c
C
apache-2.0
13,638
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #include <ulog/ulog.h> #include <string.h> #include "control_dev.h" #define LOG_TAG "[control_dev]" ctrl_device_t *audio_ctrl_device_new(int id) { ctrl_device_t *dev = NULL; dev = (ctrl_device_t *)malloc(sizeof(ctrl_device_t)); if(!dev) {...
YifuLiu/AliOS-Things
components/a2sa/src/driver/core/control_dev.c
C
apache-2.0
840
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #include <errno.h> #include <ulog/ulog.h> #include <string.h> #include "pcm_dev.h" #define LOG_TAG "[pcm_dev]" pcm_device_t * audio_pcm_device_new(int dirType, const char *name, pcm_device_ops_t *ops, void *private_data) { pcm_device_t *dev = NU...
YifuLiu/AliOS-Things
components/a2sa/src/driver/core/pcm_dev.c
C
apache-2.0
1,351
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #include <string.h> #include <errno.h> #include <ulog/ulog.h> #include "audio_rtos.h" #include "audio_card.h" #include "pcm_dev.h" #include "pb_task.h" #include "cap_task.h" #define LOG_TAG "[audio_rtos]" static native_pcm_device_t native_device[2]; ...
YifuLiu/AliOS-Things
components/a2sa/src/driver/platform/rtos/audio_rtos.c
C
apache-2.0
12,364
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #ifdef HAAS_AUDIO_DEMO #include <posix/pthread.h> #else #include <pthread.h> #endif #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include <stdbool.h> #include <aos/kernel.h> #include <aos/list.h> #include <errno.h> #includ...
YifuLiu/AliOS-Things
components/a2sa/src/driver/platform/rtos/cap_task.c
C
apache-2.0
6,038
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #ifdef HAAS_AUDIO_DEMO #include <posix/pthread.h> #else #include <pthread.h> #endif #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include <stdbool.h> #include <aos/kernel.h> #include <aos/list.h> #include <errno.h> #includ...
YifuLiu/AliOS-Things
components/a2sa/src/driver/platform/rtos/pb_task.c
C
apache-2.0
6,567
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #include <ulog/ulog.h> #include <string.h> #include <aos/list.h> #include "audio_rtos.h" #include "control.h" #include <drv/codec.h> #include <aos/aos.h> #define LOG_TAG "[template]" typedef struct { csi_codec_output_t hdl; int vol; int mu...
YifuLiu/AliOS-Things
components/a2sa/src/driver/platform/rtos/template.c
C
apache-2.0
11,985
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #include "sound_mixer.h" #include "ulog/ulog.h" #define LOG_TAG "[sound_mixer]" #define MIXER_RETURN_ERR -1 #define MIXER_RETURN_SUCCESS 0 #define AOS_MASTER_VOLUME_TX_STRING "Master Volume TX" #define AOS_MASTER_MUTE_STATE_STRING "Master Mut...
YifuLiu/AliOS-Things
components/a2sa/src/framework/sound_mixer.c
C
apache-2.0
8,279
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #include "sound_pcm.h" #include "ulog/ulog.h" #define LOG_TAG "[sound_pcm]" #define PCM_LOCK(pcm) aos_mutex_lock(&pcm->mutex, AOS_WAIT_FOREVER) #define PCM_UNLOCK(pcm) aos_mutex_unlock(&pcm->mutex) #define PCM_RETURN_ERR -1 #define PCM_RETURN_SUCCES...
YifuLiu/AliOS-Things
components/a2sa/src/framework/sound_pcm.c
C
apache-2.0
21,159
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #include "aiagent_service.h" #include "aiagent_common.h" #include "ulog/ulog.h" #if AOS_COMP_CLI #include "aos/cli.h" #endif #define TAG "aiagent_example" #define LOG printf #ifdef CONFIG_ALICLOUD_FACEBODY_ENABLE static int facebody_compare_callback(ai_...
YifuLiu/AliOS-Things
components/ai_agent/example/aiagent_example.c
C
apache-2.0
15,570
/* * Copyright (C) 2021-2023 Alibaba Group Holding Limited */ #ifndef _AI_AGENT_COMMON_H_ #define _AI_AGENT_COMMON_H_ #include <stdint.h> #ifdef CONFIG_UCLOUD_AI_ENGINE_ENABLE #include "ucloud_ai_common.h" typedef ucloud_ai_result_t ai_result_t; typedef void *ai_config_t; #elif defined(CONFIG_KWS_AI_ENGINE_ENABLE)...
YifuLiu/AliOS-Things
components/ai_agent/include/aiagent_common.h
C
apache-2.0
1,717
/* * Copyright (C) 2021-2023 Alibaba Group Holding Limited */ #ifndef _AI_AGENT_ENGINE_H_ #define _AI_AGENT_ENGINE_H_ #include <stdint.h> #include <stdbool.h> #include "aiagent_common.h" #ifdef CONFIG_UCLOUD_AI_ENGINE_ENABLE #include "engine/ucloud_ai_engine.h" #endif typedef struct _aiagent_engine_t { /* * * *...
YifuLiu/AliOS-Things
components/ai_agent/include/aiagent_engine.h
C
apache-2.0
1,115
/* * Copyright (C) 2021-2023 Alibaba Group Holding Limited */ #ifndef _AI_AGENT_H_ #define _AI_AGENT_H_ #include "aiagent_engine.h" #include "aiagent_common.h" typedef struct _aiagent_context_t { const char *name; const char *desc; int (*available) (void); aiagent_engine_t *(*create) (int engineid)...
YifuLiu/AliOS-Things
components/ai_agent/include/aiagent_service.h
C
apache-2.0
1,531
/* * Copyright (C) 2020-2023 Alibaba Group Holding Limited */ #ifndef _AI_CONFIG_H_ #define _AI_CONFIG_H_ // Choose AI Capability #define AI_MODEL AI_MODEL_COMPARING_FACEBODY #endif // _AI_CONFIG_H_
YifuLiu/AliOS-Things
components/ai_agent/include/aiconfig.h
C
apache-2.0
204
/* * Copyright (C) 2021-2023 Alibaba Group Holding Limited */ #ifndef _KWS_ENGINE_H_ #define _KWS_ENGINE_H_ #define KWS_NAME "kws" typedef void *kws_engine_cb_t; typedef struct { int8_t channel; } kws_engine_config_t; #endif // _KWS_ENGINE_H_
YifuLiu/AliOS-Things
components/ai_agent/include/engine/kws_engine.h
C
apache-2.0
253
/* * Copyright (C) 2021-2023 Alibaba Group Holding Limited */ #ifndef _UCLOUD_AI_ENGINE_H_ #define _UCLOUD_AI_ENGINE_H_ #define UCLOUD_AI_NAME "ucloud-ai" #endif // _UCLOUD_AI_ENGINE_H_
YifuLiu/AliOS-Things
components/ai_agent/include/engine/ucloud_ai_engine.h
C
apache-2.0
192
/* * Copyright (C) 2021-2023 Alibaba Group Holding Limited */ #include <stdio.h> #include <string.h> #include "ulog/ulog.h" #include "aos/kernel.h" #include "aiconfig.h" #include "aiagent_service.h" #ifdef CONFIG_UCLOUD_AI_ENGINE_ENABLE #include "engine/ucloud_ai_engine.h" #endif #ifdef CONFIG_KWS_AI_ENGINE_ENABLE #...
YifuLiu/AliOS-Things
components/ai_agent/src/aiagent_engine.c
C
apache-2.0
2,935
/* * Copyright (C) 2021-2023 Alibaba Group Holding Limited */ #include <stdio.h> #include <string.h> #include "ulog/ulog.h" #include "aos/kernel.h" #include "aiconfig.h" #include "aiagent_service.h" #include "aiagent_engine.h" #define TAG "AIAGENT_SERVICE" /* * Initialize the ai agent service */ int32_t aiagent...
YifuLiu/AliOS-Things
components/ai_agent/src/aiagent_service.c
C
apache-2.0
1,539
#include "aos/kernel.h" #include "speech_memory.h" #include "aqe_kws.h" #include "mcu_audio.h" #include "ulog/ulog.h" #include "aiagent_engine.h" #include "aiagent_service.h" #include "engine/kws_engine.h" #include "a7_cmd.h" #define TAG "kws" AqeKwsConfig kws_cfg; AqeKwsState *kws_st = NULL; uint32_t kws_cnt = 0; s...
YifuLiu/AliOS-Things
components/ai_agent/src/engine/kws_engine.c
C
apache-2.0
3,262
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. 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 a...
YifuLiu/AliOS-Things
components/ai_agent/src/engine/tflite-micro/tensorflow/lite/allocation.h
C++
apache-2.0
3,718
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. 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 a...
YifuLiu/AliOS-Things
components/ai_agent/src/engine/tflite-micro/tensorflow/lite/arena_planner.h
C++
apache-2.0
5,444
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. 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 a...
YifuLiu/AliOS-Things
components/ai_agent/src/engine/tflite-micro/tensorflow/lite/builtin_op_data.h
C
apache-2.0
916
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. 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 a...
YifuLiu/AliOS-Things
components/ai_agent/src/engine/tflite-micro/tensorflow/lite/builtin_ops.h
C
apache-2.0
5,722
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. 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 a...
YifuLiu/AliOS-Things
components/ai_agent/src/engine/tflite-micro/tensorflow/lite/c/builtin_op_data.h
C
apache-2.0
12,169
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. 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 a...
YifuLiu/AliOS-Things
components/ai_agent/src/engine/tflite-micro/tensorflow/lite/c/c_api.h
C
apache-2.0
13,036
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. 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 a...
YifuLiu/AliOS-Things
components/ai_agent/src/engine/tflite-micro/tensorflow/lite/c/c_api_experimental.h
C
apache-2.0
7,191
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. 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 a...
YifuLiu/AliOS-Things
components/ai_agent/src/engine/tflite-micro/tensorflow/lite/c/c_api_internal.h
C++
apache-2.0
5,784
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 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 a...
YifuLiu/AliOS-Things
components/ai_agent/src/engine/tflite-micro/tensorflow/lite/c/c_api_types.h
C
apache-2.0
2,981