{"id":1406,"url":"https://github.com/trifl/Chirp","last_synced_at":"2025-08-02T04:31:05.504Z","repository":{"id":56905929,"uuid":"41710450","full_name":"trifl/Chirp","owner":"trifl","description":"The easiest way to prepare, play, and remove sounds in your Swift app!","archived":false,"fork":false,"pushed_at":"2019-05-29T00:27:12.000Z","size":406,"stargazers_count":307,"open_issues_count":5,"forks_count":22,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-11T12:05:55.557Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.trifl.co","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trifl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-01T01:45:26.000Z","updated_at":"2024-04-03T01:45:54.000Z","dependencies_parsed_at":"2022-08-21T02:21:02.151Z","dependency_job_id":null,"html_url":"https://github.com/trifl/Chirp","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/trifl/Chirp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trifl%2FChirp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trifl%2FChirp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trifl%2FChirp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trifl%2FChirp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trifl","download_url":"https://codeload.github.com/trifl/Chirp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trifl%2FChirp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268334610,"owners_count":24233793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:15:45.717Z","updated_at":"2025-08-02T04:31:05.192Z","avatar_url":"https://github.com/trifl.png","language":"Swift","funding_links":[],"categories":["Media"],"sub_categories":["Audio","Other free courses"],"readme":"# Chirp\r\n\r\nThe easiest way to prepare, play, and remove sounds in your Swift app!\r\n\r\n##Installation\r\n###CocoaPods Installation\r\nChirp is available on CocoaPods. Just add the following to your project Podfile:\r\n\r\n```\r\npod 'Chirp', '~\u003e 1.2'\r\n```\r\n\r\n###Non-CocoaPods Installation\r\nYou can drop Chirp.swift directly into your project, or drag the Chirp project into your workspace.\r\n\r\n### Sample code\r\n`prepareSound` is used to preload a sound into memory. This increases the retain count of the sound by 1. You must call this method before calling playSound\r\n```swift\r\n/* MyViewController.swift */\r\n\r\noverride func viewDidLoad() {\r\n    super.viewDidLoad()\r\n    \r\n    // Load sounds into memory\r\n    Chirp.sharedManager.prepareSound(\"boop\") // default extension is .wav\r\n    Chirp.sharedManager.prepareSound(\"ding.mp3\") // so other extensions you must name explicitly\r\n}\r\n```\r\n\r\n`playSound` plays the preloaded sound\r\n```swift\r\nfunc submitButtonTouched(button: UIButton) {\r\n    // Since the sound is already loaded into memory, this will play immediately\r\n    Chirp.sharedManager.playSound(\"boop\") \r\n    \r\n    // example function that might get called when you touch a button\r\n    submitForm() \r\n}\r\n```\r\n\r\n`removeSound` removes the sound from memory\r\n```swift\r\ndeinit {\r\n    // Cleanup is really simple!\r\n    Chirp.sharedManager.removeSound(\"boop\")\r\n    Chirp.sharedManager.removeSound(\"ding.mp3\")\r\n    Chirp.sharedManager.removeSound(\"oops.mp3\")\r\n    \r\n    // If you never loaded the sounds, e.g. viewDidLoad wasn't called, or submission never failed or succeeded,\r\n    // that's ok, because these will function as no-ops\r\n}\r\n```\r\n\r\nEnjoy!  I know sound management can be a little annoying. Hopefully this helps your project out a little bit.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrifl%2FChirp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrifl%2FChirp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrifl%2FChirp/lists"}